On 14.03.2006, at 17:02, Andreas Franke wrote:
Torsten Anders wrote:
Still, what is gained if you are allowed to replace _/*SomeThing*/ by
_SomeThing, in case the latter is equivalent to _?
Four characters. If you operate on an 80-chars-per-line style for
source code, that's significant :-)
It is probably rather unwise as a non-computer scientist to stick your
neck out and argue here.
I would always hesitate before extending the core of Oz. Is it really
worth to extend the Oz syntax to save these four characters (in case _X
is equivalent to _) or even to introduce some slight semantical variant
(in case _X is a special form of X which does not trigger certain
warnings)?
To give a counter-example: it would save me much more typing, if it
would be legal to replace the common
proc {Square X Y} Y=X*X end
by something like
p {Square X} Y=X*X e
Saves 5 characters ;-) And reducing keywords like these would really
reduce my code, because they pop up all over the place. Just kidding...
On the other hand, I actually very much like the idea of saving the
amounts of typing. But if it requires to extend the core of Oz itself,
then I would opt for the big change, i.e. for introducing something
like Lisp macros instead. With such a means, everyone of us can then
easily tailor the Oz syntax according needs.
Yes, I know that Denys gave that a go and it was turned down in the
end. I also know that macros are a two edged sword: no first-class
values, makes debugging harder etc.
Nevertheless, what Denys did is still there
(http://www.mozart-oz.org/documentation/macro/node1.html) and even
still works in 1.3.1. Something like this would really save me
tremendous amounts of typing at times. I am not using it, though,
because I expect this functionality be broken at any time.
Wouldn't it be worth discussing macros for Oz again?
Best,
Torsten
--
Torsten Anders
Sonic Arts Research Centre
Queen's University Belfast (UK)
www.torsten-anders.de
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users