Ilya Zakharevich on Thu, 24 Oct 2002 12:21:29 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Parser problem

On Thu, Oct 24, 2002 at 02:14:03PM +0200, Leonhard Möhring wrote:
> But isn't the implicit typecasting which is done by print and Str done
> in an intuitive way?

There is no such thing as "an intuitive way" when parsing.  Whatever
can be easily documented is good; all the rest is an ugly hack.

> It _does_ save a lot of keystrokes for sure

One comma per double-quote.  Do not think this is a lot.  And since it
is not *documented* what print() accepts, I doubt that a lot of people
*know* that one can skip commas.

> I'd rather skip the side effects, than the way type "s" works.
> In any case, it is difficult to change this without losing backward
> compability, and i guess a majority of scripts will break if you change
> the way 'print' works.

A 3-way switch would fix this:

  0 do not allow this syntax
  1 allow, but warn on the first use that the syntax is deprecated (default)
  2 allow