Re: Euphoria vs. C and OOP
- Posted by jacques deschênes <desja at globetrotter.net> Jan 05, 2007
- 710 views
I never mentioned a dot notation The only addition would be enum declaration enum {first_name, last_name, street, town} sequence addresse address = repeat(0,5) address[first_name] = "Don" address[last_name] = "Cole" etc... this would reduce typing compared to constant first_name=1, last_name=2, town=3 and those enum could only be used to access sequence elements Jacques Deschênes don cole wrote: > > jacques deschênes wrote: > > > > I agree with you Bill, Euphoria should stay euphoria, not becoming, > > c++,java or whatever of the same. > > > > Your exemple is a good one, but the use of strings for commands would > > slow down the execution a bit. Global constants could be defined instead for > > commands. > > > > Improvement to euphoria should stick to simple guidelines: > > - minimize typing effort > > - reduce name conflict (improvement to namespaces) > > - reduce scope of variables (related to namespaces) > > > > My yesterday suggestions stick to those guidelines and I agree with Jason > > concerning an enum decleration because it would reduce typing in accessing > > sequence elements by defining constants. > > > > regards, > > Jacques Deschênes > > So you want to change: > > }}} <eucode> > > sequence holiday > > holiday="christmas" > > </eucode> {{{ > > to > > }}} <eucode> > > sequence holiday."christmas" > > </eucode> {{{ > > For the point of saving typing. Is this correct? > Would holiday be changed later by > > holiday="easter" > Or would another period be needed. > > holiday."easter"? > > Don Cole