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,475 of 264,096   
   Lawrence D'Oliveiro to All   
   Re: OpenVMS system programming language   
   25 Feb 25 02:22:06   
   
   From: ldo@nz.invalid   
      
   On Mon, 24 Feb 2025 20:33:07 -0500, Arne Vajhøj wrote:   
      
   > But I think it is good code.   
      
   I think it is bloody long-winded code.   
      
   In C++ I could write things like   
      
       typedef std::map   
           SectionTable;   
       typedef std::pair   
           SectionTablePair;   
       typedef SectionTable::const_iterator   
           SectionTableLister;   
      
   but Java doesn’t give you the option.   
      
   And then there’s the long-windedness of code like   
      
       static final java.util.Map TypeNames;   
         /* mapping from sensor type codes to symbolic names */   
       static   
         {   
           TypeNames = new java.util.HashMap();   
           TypeNames.put(Sensor.TYPE_ACCELEROMETER, "accelerometer");   
           TypeNames.put(Sensor.TYPE_AMBIENT_TEMPERATURE, "ambient temperature");   
           TypeNames.put(Sensor.TYPE_GRAVITY, "gravity");   
           TypeNames.put(Sensor.TYPE_GYROSCOPE, "gyroscope");   
           TypeNames.put(Sensor.TYPE_LIGHT, "light");   
           TypeNames.put(Sensor.TYPE_LINEAR_ACCELERATION, "linear accel");   
           TypeNames.put(Sensor.TYPE_MAGNETIC_FIELD, "magnetic");   
           TypeNames.put(Sensor.TYPE_ORIENTATION, "orientation");   
           TypeNames.put(Sensor.TYPE_PRESSURE, "pressure");   
           TypeNames.put(Sensor.TYPE_PROXIMITY, "proximity");   
           TypeNames.put(Sensor.TYPE_RELATIVE_HUMIDITY, "relative humidity");   
           TypeNames.put(Sensor.TYPE_ROTATION_VECTOR, "rotation");   
           TypeNames.put(Sensor.TYPE_TEMPERATURE, "temperature");   
         } /*static*/   
      
   because the language doesn’t provide expressions that evaluate to   
   common structure types like dictionaries/maps.   
      
   --- 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