Re: Re: Functions as commands (was Re: class proposal 2)

Paul Prescod <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
I know that you love the Wiki but I'm not sure that every single 
discussion should go there. For instance I think that this is a 
straightforward bug:

> 
> Prothon 0.1 Interactive Console, Build 678, Jun 29 2004 (Ctrl-D to exit)
> >>> print (8 + 1) + 8
> 9
> 9
> 8

Everything on the line of the command should be part of the command. The 
only ambiguous case is when everything on the line is a single 
parenthesized expression. Maybe differentiating these cases takes too 
much lookahead in which case we could just say that parens in commands 
are purely groupers and never fuction param delimeters.

> This isn't really a function-as-command confusion. It is a 
 > print-as-"not-command" confusion. :-) You need to get used to
 > print being a function and add a lot of parens.

Recall that the goal of print as command is to avoid adding a lot of parens!

  Paul Prescod
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.