Re: [q-lang-users] A proposal to adopt Python tuple syntax
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2005-06-27 07:06:26
|
John.Cowan wrote: > It's plausible, I think, to stage the change in: let 6.1 accept trailing > commas everywhere, and start to warn about the old style (but still accept > it as making a tuple); 6.2 then drops support for the old style, and > plain parens are just for grouping thereafter. Yup, that's the way to go. If noone objects, the transition will start with the next Q release. > Something I didn't realize until today is that Python doesn't actually > require parens around tuples: it's the comma that is the (currying) > tuple constructor: Yes, I know this. But in Q that shortcut is not possible, it would collide with the def and where clause syntax. > A minor point is whether (,) and [,] will become legal ways to write the > empty tuple and list respectively. I don't much care either way. Why would anyone want to have this? I don't see what this would buy. Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikwissenschaft.uni-mainz.de/~ag |