RE: Changing Euphoria
- Posted by kbochert at ix.netcom.com Jan 30, 2002
- 407 views
-------Phoenix-Boundary-07081998- Hi Shawn Pringle, you wrote on 1/29/02 1:30:25 PM: > >When it comes to changing something that is so simple and clean I >cringe. Euphoria was been around a long time with out many changes had >bugs which must have been many years old. When languages change >programs break and implementations break. The new bugs might show up in >the interpreter or the 'compiler'. Many proposed changes are features >of C that people want in EUPHORIA because they are used to C. >Things that need features in C are not needed in EUPHORIA: > >For Example: >Pass by reference: > >scanf would be something like >procedure sscanf( sequence str, sequence fmt, sequence& inputs ) > >On the other hand, in today's EUPHORIA the same thing can be implemented >with >function sscanf( sequence str, sequence fmt ) -- return user input > > >Regards, >Shawn Pringle > As I see it, there are 2 advantages to pass-by-reference: 1) More efficient. foo = modify(foo) -- involves a couple of copy operations modify (!!foo) -- modifies in place (my pass-by-reference syntax) 2) Object orientation Methods are automatically passed the instance they are to work on ('this') as the first parameter. Methods which modify the instance and also return a value are extremely awkward without 'this' beng passed by reference. It adds complexity and power, but it does indeed compromise the simplicity that makes Euphoria so attractive. Karl Bochert -------Phoenix-Boundary-07081998---