[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what most every language is missing :-)





On Thu, 27 Mar 2003, Guy Steele - Sun Microsystems Labs wrote:

>
>    Date: Thu, 27 Mar 2003 11:31:44 -0600
>    From: Trevis Rothwell <tjr@acm.org>
>    To: ll1-discuss@ai.mit.edu
>    Subject: what most every language is missing  :-)
>
>
>    How about adding a "might-equal" operator?  I recommend useng the
>    characters "=?".  I hav implemented my hone programming language,
>    incubating the might-equal operater.  It works somthing like this:
>
>      if (x =? y)
>        print ("x might equal y");
>      else
>        print ("x might not equal y");
>
>    Acording to my studys, the might-eqqul operatir is 299834% more
>    useful than the standerd ekwal operator.  For testing porposes, I
>    have usd the mighty-kwal operatyr in severul custom sofware
>    packages, including spell chex and statistics soffy-soff.  I hope
>    that you ull can make yous of it in yore own pergroomink lunkishes.
>
>    :-)
>
> It's dangerous to make jokes about programming languages:
> almost every parody feature you can think of has already
> been tried out seriously.
>
> In this case, for interval arithmetic, where a numerical
> quantity is represented by a lower and upper bound for
> a segment of the real number line that contains the
> quantity of interest, sometimes the best you can do
> is ask whether "x possibly equals y".  Sun Fortran supports
> interval arithmetic and provides 12 comparison operators:
>
> 	x .CLT. y	certainly(x .LT. y)
> 	x .CLE. y	certainly(x .LE. y)
> 	x .CEQ. y	certainly(x .EQ. y)
> 	x .CGE. y	certainly(x .GE. y)
> 	x .CGT. y	certainly(x .GT. y)
> 	x .CNE. y	certainly(x .NE. y)
>
> 	x .PLT. y	possibly(x .LT. y)
> 	x .PLE. y	possibly(x .LE. y)
> 	x .PEQ. y	possibly(x .EQ. y)
> 	x .PGE. y	possibly(x .GE. y)
> 	x .PGT. y	possibly(x .GT. y)
> 	x .PNE. y	possibly(x .NE. y)
>
> "I am not making this up."  This is actually useful.
>
> --Guy Steele

Of course, when INTERCAL came out, some laughed.  Others pointed out that
"come from" was already known, and very useful, that there is nothing
ridiculous about modal operators, and that many operations should be
available as parts of standard optional libraries.

oo--JS.