On 8 Jan 2021 18:06:00 GMT
Charlie Gibbs wrote:
> On 2021-01-08, Björn Lundin wrote:
>
> > an language that needs
> > * 'loose comparison' ==
Make that value comparison ...
> > * 'strict comparison' ===
... and value and type comparison
> > with accompanying truth tables that are not-so-obvious is just a bad
> > joke.
> >
> >
> >
> > true == 0 -> false
Yep 0 is not a true value
> > true === 0 -> false
Yep 0 is not a boolean
> > true == 1 -> true
Yep 1 is a true value
> > true === 1 -> false
Yep 1 is not a boolean
> > WTF?
Seems fine to me, you just have to understand what it means like
any other language construct.
> That sounds like a description of one of those bogus programming
> languages that pops up in humour columns from time to time.
> One of them proposed an operator meaning "is more equal than"
> (shades of Animal Farm).
Nope just someone who doesn't understand the language and wants to
complain.
--
Steve O'Hara-Smith | Directable Mirror Arrays
C:\>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|