On Fri, Jun 27, 2008 at 4:59 AM, Gabriel Dos Reis wrote:
>
> Bill Page writes:
>
> | panAxiom developers,
> |
> | I just wanted to mention something here that I just learned about how
> | the Axiom interpreter handles option arguments. When discovering how
> | the 'draw' operations in Axiom processes optional arguments, e.g.
> |
> |   draw(sin(x), x=1..10, title=="sin function")
>
> Hmm, I thought I already mentioned this in discussions with Ralf ;-/
>

Sorry I missed it. Can you please tell me wihich list? When?

> |
> | I realized the interpreter does something rather clever but probably
> | quite unexpected.
>
> It is the post parser doing it.  And I don't like it -- the irony is
> that I made Boot do the same.
>
> | The problem is that (unlike Aldor) SPAD does not
> | provide built-in support for calling functions with optional
> | arguments. Instead what it does is collect all the arguments
> | containing == into a List *and* then it applies the name to the
> | left of == as a function to the value on the right. So much to
> | my surprize:
>
> Quite disgusting, no?
>...

Weird at least, but oddly effective as a representatio. Too bad it
increases the distance between the interpreter and compiler languages.

> | What do you think? Do you like that, or is this something that
> | should be implemented in a deeper way?
>
> I don't like it:  For example, I cannot '==' to mean `definition'
> in expressions -- but I already had that debate with Ralf.
>

Perhaps it would be better to provide a function to which == maps, e.g.

  x == y  ==> OPTARG(x,y)

which does by default what the interpreter wants for now but which
allows customization?

Regards,
Bill Page.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to