Re: getenv

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jeremy Cowgar wrote:
> 
> Kenneth Rhodes wrote:
> > 
> > So which is it? ALL SORTS / ALL OVER or ONLY ONCE? It sounds as 
> > though your new ifdef code might simply the cross-platform problem
> > with getenv() without having to dumb down Linux.
> > 
> 
> It makes it possible but it does not simplify anything. It just places the
> burden
> on the programmer. The programmer must know there is a difference, then he/she
> must account for that difference in their program.
> 

I would say that if the ifdef code only has to be used once, then
it is a vast simplification.  I understand that the programmer must
know the difference, but that knowledge can be easily provided in
the language documentation.


> And the real issue to me is that the getenv() returning "" in Linux has 
> no practical benefit.
> 

 From Bernie's recent post:
>I think it is because on Linux getenv() is used in script files that
>are looking to see that nothing is in a variable.

 From Jason's recent post:
>Right, but that's a "feature" of Linux and not a "bug" in Windows. If 
>the OS returns an empty string then so should Euphoria. If the OS 
>returns "does not exist" then so should Euphoria.

> en = getenv("FOO")
> if atom(en) or length(en) = 0 then
>   -- empty
> end if

 From your (Jeremy Cowgar) recent post:
> Hm, then Euphoria does not aim to be a cross-platform language. It's 
> simply a language that will run on multiple platforms. The difference 
> is a cross-platform language handles cross-platform issues for the user. 
> A language that runs on multiple platforms simply does that, it leaves 
> all the cross-platform nuances up to the programmer to know, understand 
> and deal with in code.

Your solution is not to "handle" a cross-platform issue, but to
make a false report about it.


Ken Rhodes
Folding at Home: http://folding.stanford.edu/
100% MicroSoft Free
SuSE Linux 10.3
No AdWare, SpyWare, or Viruses!
Life is Good,  smile

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu