[nem-en] Declaring Properties in the constructor - ala Boo

vc vc at rsdn.ru
Sat Sep 30 01:41:43 CEST 2006


   > e.g. def window = Window() with Width = 800, Height = 600, Title =
   > "Window";
   > 
   > Is that macroable?
   
   More good idea is add to language operator like VB/Delphi statement
'With':
   
   def window = with (Window()) { .Width = 800; .Height = 600; }
   
   or 
   
   with (some.long.long.path.to.a.windowVariable)
   {
     .Width = 800; .Height = 600; .Title = "Window";
   }
   
   Note: The dot notation help separate access to local contact from access
to captured object.
   
   One problem is how determinate what with operator must return (void or
captured object).
   
   And second problem. Whether it is time to freeze addition of new
features?




More information about the devel-en mailing list