1. Win4Eu dilemma
- Posted by Tommy Carlier <tommy.carlier at telenet.be> Sep 16, 2004
- 463 views
Win32Lib prefixes common constants and routines with 'w32', because there were naming conflicts with other libraries. I'm talking about w32True, w32False, w32or_all, ... But previous posts from different people suggest that prefixing is not a good idea. How should I implement these common constants and routines? What names should I use? - Literal: True, False, ... - Prefixed: [prefix]True, [prefix]False, ... - Postfixed: True[postfix], False[postfix], ... - Dude-style synonyms: Cool, NoWay, ... -- tommy online: http://users.telenet.be/tommycarlier tommy.blog: http://tommycarlier.blogspot.com Euphoria Message Board: http://uboard.proboards32.com
2. Re: Win4Eu dilemma
- Posted by cklester <cklester at yahoo.com> Sep 16, 2004
- 464 views
Tommy Carlier wrote: > > How should I implement these common constants and routines? > What names should I use? > - Literal: True, False, ... > - Prefixed: [prefix]True, [prefix]False, ... > - Postfixed: True[postfix], False[postfix], ... > - Dude-style synonyms: Cool, NoWay, ... As though they've not been defined elsewhere... IOW, as literal... True should be True, False should be False. Or have them in an include file that can be easily modified in case there are conflicts. Best case, True and False would be built-in Euphoria constants. :) -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
3. Re: Win4Eu dilemma
- Posted by Greg Haberek <ghaberek at gmail.com> Sep 16, 2004
- 435 views
> - Literal: True, False, ... This is probably the best route. > - Prefixed: [prefix]True, [prefix]False, ... This is a good substitute, but often confusing and hard to read. > - Postfixed: True[postfix], False[postfix], ... Lord no! I can only imagine the confusion.. it just looks horrible. > - Dude-style synonyms: Cool, NoWay, ... Yes! Go with it!
-- sample dude-o-nyms if MyStuff = WayCool then doSomething( Radical ) elsif MyStuff = TotallyBogus then doSomething( Wicked ) else doSomething( Sick ) end if
In my opinion, I think we should follow a majority-rules type policy. I don't think Derek ever should have prefixed the Win32Lib constants and routines. A *lot* of programs and libraries are developed *around* Win32Lib, so why shouldn't Win32Lib set the precedent? I say go with just straight-faced values (True, False) and let everyone else work around that.
4. Re: Win4Eu dilemma
- Posted by Juergen Luethje <j.lue at gmx.de> Sep 16, 2004
- 464 views
cklester wrote: > Tommy Carlier wrote: >> >> How should I implement these common constants and routines? >> What names should I use? >> - Literal: True, False, ... >> - Prefixed: [prefix]True, [prefix]False, ... >> - Postfixed: True[postfix], False[postfix], ... >> - Dude-style synonyms: Cool, NoWay, ... > > As though they've not been defined elsewhere... IOW, as literal... > True should be True, False should be False. Or have them in an > include file that can be easily modified in case there are conflicts. > > Best case, True and False would be built-in Euphoria constants. :) Very, very best case. Simple cause, great effect. Regards, Juergen
5. Re: Win4Eu dilemma
- Posted by "Igor Kachan" <kinz at peterlink.ru> Sep 16, 2004
- 441 views
Hi, Tommy! You wrote: > How should I implement these common constants and routines? > What names should I use? > - Literal: True, False, ... > - Prefixed: [prefix]True, [prefix]False, ... > - Postfixed: True[postfix], False[postfix], ... > - Dude-style synonyms: Cool, NoWay, ... English Russian True = Yes, YES, yes ... Da, DA, da ... False = No, NO, no ... Net, NET, net ... These yes/no are very clear names, much clearer than true/false, on my taste. Regards, Igor Kachan kinz at peterlink.ru