[racket] P4P

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Sun Sep 19 20:57:50 EDT 2010

In replying to the below, I'm not ignoring the rest of your message.

> By, the way, why'd you decide on "numeq" instead of
> "number=?".

I don't think there's a good verbal choice here (though numeq is
especially ugly).  You can already write plain ol' =, as in,

  =(1, 2)
  -- evaluates to -->

but people found it ugly and suggested something more "verbal".  I'm
not happy with numeq and welcome better suggestions.

> Or, alternatively, why not use "as:" in place of the "=" in the
> first line and then you can use "=" as a function on numbers.

The first line of what?  You mean in function definitions?

1. As I say above, you CAN already use = on numbers.

2. Just to be clear, the use of = in function headers is unrelated to
the availability of = for numeric equality.  The = there is just a
keyword.  In fact, the = in all three of

  deffun: f(x) = *(x, x)

  let: x = 3 in: *(x, x)

  =(1, 2)

are independent: neither one precludes the other, and each could
change without having any impact on the other.  (That is, changing "="
to "as:" in function definitions would leave the other two completely
unchanged.  However, I rather like the function definition syntax and
intend to leave it alone -- the "has:" for structures was because an =
there would have been less accurate.)


Posted on the users mailing list.