[898] in java-interest
Re: Language spec syntax ambiguities
daemon@ATHENA.MIT.EDU (Jonathan Payne)
Mon Aug 14 15:31:31 1995
Date: Mon, 14 Aug 1995 08:33:34 -0700
From: jpayne@starwave.com (Jonathan Payne)
To: gary@Intrepid.COM
Cc: java-interest@java.sun.com
In-Reply-To: <9508141427.AA10532@presto> (gary@Intrepid.COM)
Not that it really matters or anything, but, If this happens, you will
see your first suicide on the java mailing list.
> Date: Mon, 14 Aug 95 07:27:43 -0700
> From: gary@Intrepid.COM (Gary Funck)
> Sender: owner-java-interest@java.sun.com
> Precedence: bulk
> X-Info: To unsubscribe, send 'unsubscribe' to java-interest-request@java.sun.com
> Content-Type: text
> Content-Length: 1223
>
>
> G'day,
>
> |
> | This is more or less what I'm looking for. However, I don't believe
> | this is quite right for a couple of reasons. First, you can also say
> | "super(x,y,z)" and "this(x,y,z)" inside a constructor (I suppose by my
> | argument above we should special case constructor bodies, but ...).
> | Also, I'd argue for something lower down the precidence chain than
> | expression since this allows "2+2.foo = 5;" which brings us back to the
> | same issue. Finally, this introduces another ambiguity. "a+b" is a
> | valid expression so does "a+b.c = 5" mean "(a+b).c = 5" here (that's
> | the parse tree you get)?
>
> If the Java language designers open up the Pandora's box of
> operator-overloading, then will
>
> (a+b).c = 5
>
> be valid? (if, for example,"+" returns a reference to a class object.)
>
> Likewise, I assume
>
> ((myclass)2+2).foo = 5
>
> would become legit as well, since "myclass" might define "+" on objects
> of 'myobj' added to integers.
>
> --
> | Gary Funck gary@intrepid.com
> | Intrepid Technology Inc., Mountain View CA (415) 964-8135
> | "Everybody has plans, until they get hit." -- Mike Tyson
>
>
> -
> Note to Sun employees: this is an EXTERNAL mailing list!
> Info: send 'help' to java-interest-request@java.sun.com
>
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com