I need your opinion...

rssh at gradsoft.com.ua rssh at gradsoft.com.ua
Sat Mar 21 13:56:07 PDT 2009


>
> 1.
>   After some time, I found that there was better solution for consider
> operator:
> Allow final variables and final Fields (except blank final), to not
> having explicit Type.
>
>   Consider operator can help in dealing with generics, which are pain
> in the as..
> I often found that Types took even 50% code, which is insane.
>
> Normal:
>          for ( ComparablePair<String,StatisticsCollector<Days>> pair :
> statisticsCollectors ){ Б─і }
>
> Consider operator:
>          for ( ::pair : statisticsCollectors ){ Б─і }
>

 Good, but not 'strictly' required.

> New final way:
>          for ( final pair : statisticsCollectors ){ Б─і }
>
> New final way & while-each loop:
>          while ( final pair : final iterator =
> statisticsCollectors.iterator() ){
>               if ( ! isValid(pair.getKey()) ) iterator.remove( pair );
>            }
>
> 2.
> Add forget keyword to allow erase variable from current context (block):
>    - For method parameters it's now impossible.
>    - Assigning null to variable is lame and not possible for final
> variables.
>    - Blocks not always fit to this purpose.
>

 Why ?

> 3.
> Are glue classes hard to understand?
>

 Exists many more-known names for similar functionality  ('traits', as in
scala, 'flawors' in lisp dialects)

> 4.
> Blocks in classes:
> Peoples often do not use formatters because they do not keep logical
> order in class structure, this would allow to define proper grouping.
>
> class Some{
>    { // block boo
>       private Boo boo;
>
>       public Boo getBoo(){
>          return boo;
>       }
>
>       public void setBoo(Boo boo){
>          this.boo = boo;
>       }
>    }//end block
> }
>

 This I can't understand. I. e. block without any semantics - why ?






More information about the coin-dev mailing list