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

*To*: Guy Steele - Sun Microsystems Labs <address@hidden>*Subject*: Re: what most every language is missing :-)*From*: Trevis Rothwell <address@hidden>*Date*: Thu, 27 Mar 2003 16:17:49 -0600*Cc*: address@hidden*References*: <200303271813.h2RIDb012620@sydney.East.Sun.COM>*Sender*: address@hidden

Wow! I seem to have started something a lot more serious than I had intended. I, too, had realized that this feature could have actual uses, but I still think I came up with some pretty spiffy applications for it. :-) I made a simple implementation of this, essentially making a "is-type- of" operator. That makes sense. I guess the absurd quality I was looking for was if the operator's value was simply random, but you tried to use it as if it would produce predictable results. Oh well. Maybe I'll do better next time! -- Trevis Guy Steele - Sun Microsystems Labs wrote: > > > 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

**References**:**Re: what most every language is missing :-)***From:*Guy Steele - Sun Microsystems Labs <Guy.Steele@sun.com>

- Prev by Date:
**Re: what most every language is missing :-)** - Next by Date:
**Re: strategies for learning new languages** - Previous by thread:
**Re: what most every language is missing :-)** - Next by thread:
**Re: what most every language is missing :-)** - Index(es):