"Fossies" - the Fresh Open Source Software Archive

Member "swig-4.1.1/TODO" (30 Nov 2022, 7558 Bytes) of package /linux/misc/swig-4.1.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "TODO": 4.0.2_vs_4.1.0.

    1 SWIG TO-DO
    2 
    3 -----------------------------------------------------------------------------
    4 
    5 ****    = High Priority
    6 ***     = Implement if possible.
    7 **      = Will implement if time.
    8 *       = Implement if bored (or deemed necessary).
    9 
   10 defer   = Implement in next version
   11 
   12 CORE:
   13 
   14 ****   Add support for nested classes.   The type system should be
   15 defer  ready to go.  The primary obstacle lies in the target language
   16        modules (which were never programmed with nested classes in
   17        mind).  There are also issues with nested C structures.  For
   18        example:
   19 
   20              struct Foo {
   21                  struct {
   22                      int x,y;
   23                  } z;
   24              };
   25 
   26        This is one of the last remaining "hard" problems in the SWIG
   27        core, but it is important that we solve it.
   28 
   29 ***    Implement $fail special variable substitution in wrappers. Used
   30        to properly transfer control out of a wrapper function while
   31        reclaiming resources.
   32 
   33        Note: Implemented in languages that uses the UTL via the
   34        'SWIG_fail' macro.
   35 
   36 ***    Rewrite declaration annotation to better unify %rename and related
   37        directives.  Add a selector mechanism that allows specific parse tree
   38        nodes to be identified.  For example:
   39 
   40              %feature("foo", nodetype="class") Foo { ... some code ... };
   41 
   42        Consider use of wildcards.   Namespace/nested scope support in
   43        %feature is currently weak.  It works, but is fragile.  Consider
   44        an implementation that is better integrated with symbol table
   45        management.  Continue to consolidate SWIG directives to %feature.
   46 
   47        Note: Initial implementation in the %rename directive.
   48 
   49 ***    Add more intelligent information related to object ownership.
   50        SWIG should be able to automatically strip ownership from
   51        objects when they are assigned to pointer variables and structure
   52        members as well as stored in a container (i.e., an array of pointers).
   53 
   54        [ Partially finished for Ruby/Perl/Tcl/Python. ]
   55 
   56 **     Restoration of the documentation system.
   57        [ Partially done for Python. ]
   58               
   59 
   60 **     Restoration of Objective-C support.
   61 
   62 **     Unification of symbol tables and type system scopes.  In a sense
   63        they capture the same information so it is not necessary to have
   64        both.  The existence of two symbol management systems is mostly
   65        historical.
   66 
   67 Build
   68 -----
   69 
   70 Library
   71 -------
   72 
   73 ****   Add more support for the C++ standard library.  std::complex and other
   74        core datatypes.   Refine support for STL vector.   Add more STL objects.
   75 
   76        [ Partially finished for Python. ]
   77 
   78 ****   Continue to expand the set of recognized typemaps.
   79 
   80 Windows
   81 -------
   82 
   83 All language modules
   84 --------------------
   85 
   86 Python
   87 ------
   88 
   89 ***    Ability to wrap certain classes as Python built-in types.
   90 
   91 Perl
   92 ----
   93 
   94 ****   Rewrite runtime pointer type checking to better integrate
   95        shadow classes.   Creation of shadow classes should be done
   96        in C instead of Perl.   This will fix a number of problems
   97        related to typemaps and reduce the amount of Perl wrapper code.
   98 
   99 ****   Create tests for existing support for operator overloading
  100 
  101 Tcl
  102 ---
  103 
  104 Ruby
  105 ----
  106 
  107 ****   The "Resource Management in Proxies" section of the "SWIG and C++"
  108        chapter discusses how proxies' ownership of their associated C++
  109        object can change, and the use of the special disown() and
  110        acquire() methods to change this ownership status. Need to
  111        address this for Ruby as well.
  112 
  113 ***    Add support for keyword arguments (by collecting them in a hash?).
  114 
  115 Java
  116 ----
  117 
  118 
  119 C#
  120 --
  121 
  122 PHP
  123 ---
  124 
  125 ****   Look at moving to using the UTL.
  126 
  127 **     When returning wrapped objects via alternate constructors if that
  128        pointer value already exists "out there" as a resource we should
  129        use the same resource, we can't have multiple ref-counted resources
  130        mapping to the same object in case it gets twice destroyed.
  131 
  132 **     Look at pass by point and passby ref,
  133        Make sometype** to be auto allocated
  134        Make sometype& and sometype* to be autoallocated IF THEY ARE NOT
  135        ALREADY swigtype wrapped.
  136 
  137 *      Review to see what else is missing!
  138 
  139 Guile
  140 -----
  141 
  142 **     Maybe rename slot setters from CLASS-SLOT-set to CLASS-SLOT-set!
  143        to match Scheme convention for naming of mutators.
  144 
  145 **     Support keyword args.
  146 
  147 **     Director Support!
  148 
  149 **     Cleaner handling of multiple values.
  150        Use a typemap keyword argument "numoutputs" of "out" and
  151        "argout" to indicate how many values are returned.
  152 
  153 **     Make SWIG's types first-class by using a separate smob type for
  154        SWIG type descriptors; enable reflection on types.  (Maybe
  155        GOOPS metaclasses?)
  156 
  157 **     Provide a clean way to construct type predicates.
  158 
  159 **     In GOOPS mode, maybe make overloaded functions methods. 
  160 
  161 **     Increase the safety of destructor functions.  John Lenz suggests:
  162 
  163 	  I think the best way of doing this would be to use %feature to mark  
  164 	  which classes allow for "normal" <swig> smobs to be deleted explicitly.
  165 
  166 	  We separate pointers into two classes, those that can be deleted from  
  167 	  scheme and those that can't.  The pointers that can be deleted use the
  168 	  <collectable-swig> smob and those that can not be deleted use the  
  169 	  <swig> smob.  A user can specify which type of each object they want  
  170 	  with %newobject and the CONSUMED typemap.
  171 
  172 	  By default, the exported destructor will only accept <collectable-swig>  
  173 	  smobs, because by definition, collectable-swig smobs are those that can  
  174 	  be deleted from scheme.  This allows for the user to implement  
  175 	  protection.  In the interface file, the user has complete control over  
  176 	  which objects can and can not be deleted, and can guarantee that  
  177 	  objects that should not be deleted can not be deleted, and that objects  
  178 	  that should eventually be deleted will be garbage collected.
  179 
  180 	  This protection can then be overridden with a %feature directive,  
  181 	  something like
  182 
  183 	  %feature("guile_allow_destroy_all","1") Foo::~Foo;
  184 
  185 	  I don't know what word we want to use, guile_allow_destroy_all is kinda  
  186 	  bad.  This feature would then allow for a <swig Foo *> smob to be  
  187 	  deleted by passing it to the destructor.  This would allow users to  
  188 	  maintain the protection on other classes, only manually overriding the  
  189 	  protection on the classes that need it.
  190 
  191 
  192 Mzscheme
  193 --------
  194 
  195 **     Port list-vector.i and pointer-in-out.i from Guile.
  196 
  197 **     Add shadow class support for the Swindle system. 
  198 
  199 Ocaml
  200 -----
  201 **     I've been working with my camlp4 module and type information
  202        from the compiler.  When I'm done, the user will have access
  203        to type inference when writing code, when the inference is
  204        unambiguous.  This allows the user to write x = _foo 1.0
  205        instead of x = get_float (_foo (C_float 1.0)).  It's not as
  206        easy as it sounds, because O'caml doesn't keep type information
  207        at run time, and doesn't really have a mechanism for doing what
  208        I need.  However, it's possible to write a preprocessor that
  209        inserts correct type info at compile time.
  210 
  211        That having been said, the program must compile for type info
  212        to be available, so I need to attend to a lot of details;  The
  213        program must compile both with and without type augmentation.
  214        
  215 Xml
  216 ---
  217 
  218 
  219 Documentation
  220 -------------
  221 
  222 ****   Extending SWIG (and internals).
  223 
  224 ***    Perl, Python, Tcl modules.
  225 
  226 ***    add section for Perl module support for operator overloading