Function types syntax

Peter Levart peter.levart at marand.si
Wed Jan 27 07:51:15 PST 2010


On Wednesday 27 January 2010 16:27:39 Peter Levart wrote:
> What about the following:
> 
> VariableDeclarator:
>     VariableDeclaratorId : Block
> 

This is off subject, but the above construct could be usefull if the following rules were defined:

- variables declared with block declarator (above) are definitely unassigned at the start of the block and allways definitely assigned after the block.
- if variable is declared with 'final' modifier and using block declarator then it is considered final only after the block, inside the block it is not final.

for example:

final int x: {
  x = 0;
  if ...
    if ...
      if ...
         x = 1;
};


Regards, Peter


More information about the lambda-dev mailing list