On Fri, Jan 6, 2012 at 5:24 PM, Waldek Hebisch wrote:
> I would like to make syntactic differences between Spad
> and interpreter smaller.
> ...
> What do you think about following proposals:
>
> - make 'exquo' and 'yield' into keywords in interprter.

Yes. I assume that you mean to parse 'exquo' as a binary infix
operator in the interpreter?

I think it is unfortunate that as an operator that returns
Union(...,"failed") the name is irregular. Most such operators have
names like 'subtractIfCan' with 'IfCan' as a suffix. But 'quoIfCan'
seems awkward to me and I think it would be nicer to use a single
character marker similar to ! and ?.  A name with a trailing % might
be suitably mnemonic for such "partial" operators. Then 'quo%'  and
'subtract%' etc.

Of course an option to parse other binary operators in infix form
would also be nice.

> - make 'break', 'default', 'define', 'do', 'export',
>  'free', 'inline', 'local', 'macro', 'rule' into
>  keywords in Spad

Yes.  I thought 'macro' was already a keyword, no? Does Spad in FriCAS
allow parameters in macros?

> - turn 'otherwise', 'when', 'div', 'suchthat' and 'unless'
>  into ordinary names

Yes.

> - turn 'cross' into keyword (it is currently used in
>  algebra, so we would have to rename current uses, for
>  example to vectorProduct)

Yes. What would be a typical usage of 'cross'?  Do you also think of
adding Cross as a built-in type similar to Aldor?

> - eliminate special treatment of spaces after escape
>  in interpreter
>

Yes.

> BTW: This is just one part of differences.  Eventually
> I would like to use the same compiler for interpeter and
> Spad (the only difference would be that interpeter should
> be more forgiving for type errors (by automatically
> inserting coercions).  As first step I would like to
> use the same scanner for Spad and interpreter.  In
> principle scanner could have two "modes", one for
> Spad and one for interpreter.  But using the same
> rules is better...
>

This sounds good to me.

Regards,
Bill Page.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to