Kevin Glynn wrote:
Andreas Franke writes:
 > 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 :-)


> [I thought the proposal was that _SomeThing is a normal variable name, > but the compiler will warn if it is used more than once.] >
Yes, that is my favourite variant.  _SomeThing would be a perfectly
ordinary identifier name that doesn't trigger unused variable
warnings. It would *not* be equivalent to '_'.

I'm also in favour of this variant.

Currently, the warning about "variable used only once" it's very helpful during lab sessions. It makes students realise that they are missing something in the code.

But sometimes, it could very useful to have a pattern matching explicitly showing that one of the variables won't be used in the following code. Something like the << case L of Head|_Tail >> mentioned by Raph in another email.

cheers
Boriss


k






_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to