Re: Re: print ambiguity
Joe Mason <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Jun 26, 2004 at 04:04:44PM -0700, Mark Hahn wrote: > When I saw this ambiguity I announced the idea as dead. That's what I found... > Then Paul switched his vote from no to yes and argued that that printing a > tuple constant was a useless case. You can always do "print((1,2,3))". He > also argued for not allowing just any function to be used as a command, > which was my original proposal. His proposal was that you had to specify > that a function was "command-enabled". I think the archive is incomplete, unless this is under a new thread with an unintuitive title, because I didn't see any of this. > 2) The command format is only allowed when used on a line by itself. > > x = print a, b, c # not allowed > > print a, b, c # ok > > x = print(a, b, c) # ok Laurent just said that one "exciting" use of this syntax was to make userdefined keywords. I don't see how this helps: if you want a keyword like "object" or "with", you'd have to pass an entire block to it - does this syntax allow that? If it's just for things that can only take simple expressions as arguments, why not just make a function? (I vote no, but I guess I'm too late...) Joe