home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 262,474 of 264,096   
   =?UTF-8?Q?Arne_Vajh=C3=B8j?= to Lawrence D'Oliveiro   
   Re: OpenVMS system programming language   
   24 Feb 25 20:33:07   
   
   From: arne@vajhoej.dk   
      
   On 2/24/2025 8:05 PM, Lawrence D'Oliveiro wrote:   
   > On Mon, 24 Feb 2025 16:55:31 -0500, Arne Vajhøj wrote:   
   >> Type declarations are part of the Pascal way.   
   >>   
   >> But I don't think it is the same in OO languages.   
   >>   
   >> I have never heard a Java developer ask for it.   
   >   
   > Never written things like this?   
   >   
   >      private final HashMap   
   >          SatLabels = new HashMap();   
      
   I would write:   
      
   private final Map satLabels = new HashMap();   
      
   to follow OO best practice and Java coding convention.   
      
   But I think it is good code.   
      
   It is very clear what it is. All Java developers know what Map   
   and HashMap are.   
      
   Introducing application specific aliases for Map   
   and HashMap would make the code less readable.   
      
   > Or this?   
   >   
   >      return   
   >          new Iterable>()   
   >            {   
   >              public Iterator> iterator()   
   >                {   
   >                  return   
   >                      new ResultMapIterator   
   >                        (   
   >                          Resolver.query   
   >                            (   
   >                              /*uri =*/ ProviderUri,   
   >                              /*projection =*/ FieldNames,   
   >                              /*selection =*/ Selection,   
   >                              /*selectionArgs =*/ SelectionArgs,   
   >                              /*sortOrder =*/ SortOrder   
   >                            ),   
   >                          FieldNames   
   >                        );   
   >                } /*iterator*/   
   >            } /*Iterable*/;   
      
   I see lots of problems in that code.   
      
   I don't consider lack of type aliases as one of them.   
      
   Arne   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca