Re: Suggestions for ESL (was: Euphoria Standard Library on UBoard)
- Posted by Dave Probert <zingo at purpletiger.com> Jul 24, 2005
- 501 views
D. Newhall wrote: > > Juergen Luethje wrote: > > > > Dave Probert wrote: > > > > > As far as a naming convention for enum stuff goes, whatever is chosen > > > should reflect what the task is related to. > > > > > > next() is very vague as far as a function name goes, > > <snip> > > Too crazy. :) I don't think that many people would want to put "the_" infront > of anything > really. Sorry to say, but I must agree - imagine someone trying to guess what the_next() means in documentation or code. Sounds like a new age pop group!!! Also have you considered this: for a = 1 to 10 do ... next For old-skool basic programmers coming across to Euphoria they will get very confused by the phrase 'next'. It's just too short and meaningless as a word. > My $0.02 for if we want to make enum a type: > > constant DAYS = create_enumerator(1), > SUNDAY = enumerate(DAYS), > MONDAY = enumerate(DAYS), > -- etc. > <snip> This is far more understandable in code - maybe not so 'readable' (ie short names!), but definately much more sensible naming. I realise that C# uses next(), but we're not trying to write C# in Euphoria! This is to be a Standard Library with certain conventions - one of which should be meaningful naming conventions. Try not to look at the function names as only appearing in test code fragments, but as someone who didn't design the function but wants to use it and will be searching/scanning through the documentation for it. If it doesn't say what it does then there is the immediate chance of confusion. BTW, I'm all for the ESL. In fact when I first came to use Euphoria it was one of the things I was trying to get people to think about, but everybody just said it would never happen. It's nice to see so many people involved or making comments about it. Once the ESL gets underway at code level then I'm sure I have a few useful functions that we can add :) Cheers, Dave . .. : :: = == == = :: : .. . Server-Side DB driven web sites, Software Development (and part-time games developer) contact dave_p at purpletiger dot com or probert.dave at gmail dot com . .. : :: = == == = :: : .. .