I need your opinion... (original) (raw)

Marek Kozieł develop4lasu at gmail.com
Sat Mar 21 12:52:36 PDT 2009


There is no point in writing a proposal if people will not use it. I have found that some parts of programming are problems for me and for the others, but you might have a different experience so I would like to hear your opinion about listed points.

  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> pair : statisticsCollectors ){ … }

Consider operator: for ( ::pair : statisticsCollectors ){ … }

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 ); }

  1. 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.
  2. Are glue classes hard to understand?

  3. 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 }

-- Pozdrowionka. / Regards. Lasu aka Marek Kozieł

http://lasu2string.blogspot.com/



More information about the coin-dev mailing list