jastrachan | 15 Nov 19:38 2004
Picon

Re: quick JSR conference recap

On 15 Nov 2004, at 17:36, Michael Campbell wrote:
> No no, I mean the IMPORTANT stuff... what decisions were made about
> optional parens and semis?  =D

Semis are still optional as are parens, but only for root expressions 
(statements) not for expressions.

More on the lower level detail as we brain dump the discussions into 
the new JSR CVS area (we went through alot and its gonna take us a 
little while to brain dump it all down into test cases / examples).

Another new rule is that return is mandatory again; apart from blocks 
with 1 expression, so that we can keep the concise GPath expressions. 
Also we have dumb statement parsing, to catch common typeos introduced 
by adding extra whitespace. e.g.

foo() {
   println 5
   +5  // compile error as this is a dumb expression
}

would generate a compile error. It must be one of these instead...

foo() {
   println 5+
   5
}

foo() {
   println 5 +5
}

foo() {
   println 5
   return +5
}

> On Mon, 15 Nov 2004 09:15:03 +0000, jastrachan@...
> <jastrachan@...> wrote:
>> On 13 Nov 2004, at 23:36, Michael Campbell wrote:
>>> Man, I'm excited now; can you say (or point to somewhere where you've
>>> already said) what stuff is changing?
>>
>> We'll be putting all the new compiler rules & language changes into 
>> CVS
>> really soon as a large bunch of test cases to demonstrate what will be
>> allowed & what will generate warnings/errors.
>>
>>  From a high level we mostly fixed lots of things in the language to
>> give much better compile time errors when people make typos, making 
>> the
>> language much more rigid and easy to use while keeping its look & 
>> feel.
>> We've also come up with an interesting possible new way of making
>> Markup, which I'll defer until we've written some examples...
>>
>> Probably the biggest look-and-feel change is that variable 
>> declarations
>> now must use a type descriptor or 'def'.
>>
>> e.g.
>>
>> // these are all valid
>> def x = 1
>> String x = 1
>> def String x = 1
>> def x
>> String x
>>
>> // however these are invalid declarations of a variable as it could be
>> a typeo
>> x = 1
>> x
>>
>>
>>
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>>
>>
>
>

James
-------
http://radio.weblogs.com/0112098/


Gmane