Re: Euphoria vs. C and OOP
- Posted by jacques deschĂȘnes <desja at globetrotter.net> Jan 05, 2007
- 768 views
Don't like this! need string comparison to access sequence elements (slow) It would be better to adopt something like c struct as in a previous post. seqtype address sequence first_name sequence last_name sequence street sequence town end seqtype then first_name, last_name, etc... would be converted to constant ny the parser. address customer customer[first_name] = "" -- we keep the [] notation instead of dot notation -- not to forget that in euphoria every is a sequence jacques deschĂȘnes c.k.lester wrote: > > Or something like this: > > newSequence("addresse") -- newDatabase > define_elements( -- define_fields > "addresse" , > { > "name_first", > "name_last", > "street", > "town" > } > ) > > set("addresse","name_first","Don") > set("addresse","name_last","Cole") > > That's a simple example and makes the code infinitely flexible.