1. Win4Eu dilemma

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

new topic     » topic index » view message » categorize

2. Re: Win4Eu dilemma

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/

new topic     » goto parent     » topic index » view message » categorize

3. Re: Win4Eu dilemma

>  - 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.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Win4Eu dilemma

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. smile
Simple cause, great effect.

Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

5. Re: Win4Eu dilemma

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu