Konstantin L. Metlov | 15 Aug 19:55
Picon

Re: Using dotted notation in expressions

Hello !

Sorry for my silence, I was a little bit distracted by the floods in
Prague...

I still have a problem with the code, since I do not understand clearly --
what you actually want to do. I have modified your files (the changes are
highlighted in the attached diff) to make an expression to correspond to
the gnu.jel.Library initialization you've done, being pretty much sure
that the result is not what you want.

The point is that the methods of the classes supplied to the first two 
arguments of the Library constructur are defined in the _root_ of the 
namespace. Their fields/methods will be accessible without dot operator, 
which is the change described in the attached diff.

In order to use the 'dot' operator you need to either have the root
context containing the fields/methods whose value/return type is a
non-primitive class (on which you would cast the dot operator in an
expression), or, you need to define the "dynamic variables" (see
corresponding section of JEL manual) whose type is a non-primitive class.

Which of the above possibilities to use depends on the answer to the 
following question:

Will the number of root variables change during the program runtime ?

If the set of root variables is fixed, adding them to one of the classes, 
supplied as a first arguments of the Library constructor will provide the 
highest performance. If you plan to add variables during run-time the 
(Continue reading)


Gmane