Object orientation in Scilab 6

Simon Lipp simon.lipp at scilab.org
Fri Jul 31 15:37:26 CEST 2009


Hi,

For those ignoring it, I’m in charge of introducing an object
orientation to Scilab for the version 6.0. This is a first public
proposal, for discussion. 

There’s nothing really fancy, since we agreed on the very big picture
(dynamic langage with introspection, for the big picture). There’s
however some points I would like to drag your attention onto : 
 * Are the unusual visibility rules okay, or too unusal ?
 * "class" is a keyword used for declarating a class, but is also a
property of instances, and an attribute of slots. Seems reasonble for
you, or not ?
 * Visibility of the %remove_* and %install_* methods (public, in this
proposal)
 * Should we propose an acces to the current level in methods and
accessors, like we propose an access to parente level (with the special
variable super) ? I didn’t made so because similar langages in this
regard (Objective-C) doesn’t do it, an it doesn’t seems te be a real
issue to its users.
 * Should we propose an acces to the sender in methods ? And to sender
level ? It would allow to emulate visibility in magic methods
(%get_slot and %set_slot). It seems not very useful to me (and really,
KISS ;)), but it can be discussed.
 * Should we propose a way to dynamically bind a function to an object,
that is, making it a method but not a slot ? It would be like this:
   function m = a_method_which_transforms_a_function_into_method(f)
	m = this.%bind(f)
   endfunction
   ...
   meth = obj.a_method_which_transforms_a_function_into_method(MyFunc)
   meth()
   // meth will be treated as a obj method ; it will has access to obj
with this, and to private and proteced members.

   Same here: seems not very useful, KISS, but let’s discuss.
 * If a matrix of objects contains several objects, what is allowed,
   what is forbidden ? In this SEP, only extracting elements is
   allowed, and methods and properties can be manipulated only with
   single objects. Good idea at your opinion, or not ?

For whose having read the proposal on the private wiki, this SEP is
intended to be the same, but simpler. I hope. At least, I tried to make
it so…

That’s all ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: objet-SEP.odt
Type: application/vnd.oasis.opendocument.text
Size: 23428 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20090731/8cbdaea3/attachment.odt>


More information about the dev mailing list