Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ReExplanation of (x<y<z)

1 view
Skip to first unread message

DMB@PSUVMA.BITNET@ndmce.uucp

unread,
Oct 17, 1986, 5:06:19 PM10/17/86
to

Sorry I guess the question wasn't which languages support it, but why
most of the major ones don't?


Isn't it a direct translation from
if (x<y<z) then ... to ... if (x<y) and (y<z) ...

Thus the optimization arguement isn't valid.

One grows tired of writing,

if (thepoint[xdir,ydir].threepoint.x < 5) and
(thepoint[xdir,ydir].threepoint.x > 1) then

or some similarly boolean expression.

dave brosius

ke...@tekla.uucp

unread,
Oct 21, 1986, 12:26:49 PM10/21/86
to
[Flame on!]
All right you guys. I am getting tired of this. What about all of the
LISPs which allow (< x y z q) or [a la SCHEME]: (<? x y x w h q) et
cetera? The problem with infix operators is that it is frequently
difficult for compiler writers to generalize them efficiently, therefor
you don't have the concise logical functions you want. With LISPs you are
already dealing with parse trees so the generalization of operations and
efficient compilation are there. Perhaps the newer parse tree editors
will let you have the notation you want by defining the appropriate edit
functions for your favorite language. Taking an efficiently compiled
language such as Scheme and building an editor front end which elides the
parens for you who don't like them is probably a better course. There is
the danger here though. You might get used to, or even (God forbid!) get
to like functional, object oriented etc. styles of programming. Come on
guys, widen your paradigms!
[!Flame off]

-Ken Dickey

0 new messages