From: Dan Sugalski [EMAIL PROTECTED]
> This will potentially get out of hand quickly

I don't think this is a case where out-of-hand-generalization is necessary.
I'm only saying that there could be a handy shorthand for a single very
common case. Nevertheless, I'll simplify the proposal.  Oh, and forget I
said anything about the .= operator, I'm glad it's keeping its current job.


Suppose there were a #= operator (or whatever you like) which means nothing
more and nothing less than "instantiate an object of the type the variable
is declared for using the 'new' method of that class.  Pass the value on
the right as the single argument, and assign the results to the variable on
the left".  To me that results in delightfully clean and unambiguous code
like 

    $date #= 'Sep 21, 1963';

If the compiler detects that there is no 'new' method that accepts a single
argument of the type to the right of the operator then that's a
compile-time error.

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


Reply via email to