develooper Front page | perl.perl5.porters | Postings from June 2022

Re: A troubling thought - smartmatch reïmagined

Thread Previous | Thread Next
From:
William Lindley
Date:
June 26, 2022 11:06
Subject:
Re: A troubling thought - smartmatch reïmagined
Message ID:
31ea4fa8-51db-0c83-80f7-626edd8c3ce7@wlindley.com
On 6/25/22 16:13, Paul "LeoNerd" Evans pointed to his article saying:
>   no boolean is ever ≡ to any non-boolean

On this point I disagree.

Rant (the longer): The whole "let's spell the logical 0, basis of the 
binary number system built on Charles Boole's logic, as the letter 'f' 
the letter 'a' the letter 'l' the letter 's' the letter 'e' instead of 
the number zero" thing is creeping up and its problems will only grow. 
In actual machine code, as in C, there is only 0 and 1 for Boolean 
logic. Representing a logical value which inside the computer is 
identical to a number as an English word is a confusion both in data and 
in programming, not to mention it uses 36 bits on average to represent a 
1-bit value ('true' or 'false' instead of '0' or '1').  1 should always 
be true, 0 should always be false. That's how we have always written and 
conceptualized text and data files, because of their numerical and 
electronic (hardware) basis.

Rant (the shorter): Emulating Ruby where 0 is true is not going to do 
Perl any favors. [1]

\\/

[1] In Ruby, everything is an object; thus 0 is an object; and all 
objects are true. The twisted thought required for this construction 
beggars belief.



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About