Re: ESL Master Include File

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

I have to say that I agree with Derek 100% here.  

Definitions of both TRUE and FALSE should be done as (1=1) and (1=0) so that
they can match the language calculated values, else you end up with a
proliferation of varying values for what people think true and false should mean
- which is a crazy and very stupid situation to get into.

Eg.  Language BibbleSplat equates a truth value to "Oink,Oink" and all the
internal functions have built in Assembler checking for that value to be a true
value. The user then tries to use those built-in language functions compaing
against a value of -99999 (which they have defined in a variable called TRUE
within their library code); then, strangely enough, those functions will not work
for them!  Whereas if the user does not try to DEFINE the VALUE of true to
anything, but accepts what the language gives them, then they should have no
problems.  [Obviously this is a ficticious example, 'cos the BibbleSplat language
has not been released yet!!!]


Derek Parnell wrote:
> 
<snip>
> Yes, you are. Why change getc()? If EOF was defined and *other* functions were
> defined
> to return this, then that's what the caller would test for.
> 
> > >BTW, and I'm sure you already know this, but there are plenty of languages
> > >that implement TRUE
> > as -1 instead of 1.
> > And it would be equally wrong in such languages to define a global
> > constant of TRUE as +1.
> 
> I think you are confusing built-in stuff with user-written stuff. 
> If one wants TRUE and FALSE to be the exact same values as Euphoria's 
> built-in value then they should be assigned thus ...
> 
>   constant TRUE = (1=1)
>   constant FALSE = (1=0)
> 
> But if you are not trying to do that, then so long as they are not the same as
> each other, the values can be anything at all.
> 
> But I fear that I'm too far to the left for most people, so just forget that I
> even broke wind.

Can't do that, the cloud has already reached Thailand ;)

> -- 
> Derek Parnell
> Melbourne, Australia
> Skype name: derek.j.parnell
> 

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu