Hi Henrik,

> The only objection I have against this is that it now becomes impossible to
> know if a certain function is global or not, and if not, to know which class
> it belongs, from simply looking at the invocation.


For that reason I first used a new convention using the '%' character
for functions defined with 'dp' (as opposed to the '>' for normal

   (class +Add)

   (dp foo% (X Y)
      (+ X Y) )

   (dp bar% (X Y Z)
      (+ X Y Z) )

I found it too verbose after all. Perhaps a matter of taste. Not knowing
certain details of a definition by just looking at it is the normal case
for other functions and methods too.

When a message is sent to an object (foo> Obj), you also can't tell from
just a static inspection.

In case of (foo Args) the situation should be relatively clear from the
preceding 'context' call.

> Instead of using the class functionality in a basically static way like I
> often do it would then maybe be better to simply impose a new convention
> which could read something like this:
> "If you find yourself doing something in a way that would constitute a class
> with only static methods and no member variables in another language then
> you should dispense with the class and instead do (de classname.funcname ())
> instead of public methods and (de "funcname" ()) instead of private
> methods."


> To sum it up: making use of the fact that PicoLisp is perhaps the most
> forgiving language when it comes to what characters are allowed in function
> names should be exploited further instead of creating new constructs that
> add complexity to the language.
> We already have conventions where we use ?, " and > in names, we can have
> more.

Right. I would propose the above '%' convention then.

- Alex
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to