[racket] A question about code-style (and memory usage)

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jul 26 14:26:23 EDT 2011

About a minute ago, Stephan Houben wrote:
> On 07/26/2011 07:18 PM, Eli Barzilay wrote:
> > On one hand I like such identifiers, but on the other there could be a
> > lot more.  Just looking at random things, I can see `π', `→' or `⇒'
> > (for `=>'), `≤', `≥', `…', `∞' and `-∞', `∊' (for `member'), `√', and
> > many more.
> I believe I have most of the obvious ones covered in mathsymbols.rkt
> See http://planet.plt-scheme.org/package-source/stephanh/mathsymbols.plt/1/0/planet-docs/manual/index.html
> for an overview.

There's another issue there -- you'r binding such things as `≠', which
are not functions so you're not doing just aliasing.  Yet another
question is whether things like `∊' and `∅' should be bound to set
things or list things, and whether `∨' and `∧' should be bound to
`and' and `or' or maybe they should be bound to `for/and' and
`for/or'.  (There's also the cheap solution of looking for new
characters like `⋎' and `⋏' but that's even more cheating...)

> > Maybe even `½', `¼', `¾', `-½' etc...
> I considered adding those but in my opinion they would work better
> as a proper extension of the reader, i.e. 2½ as an alternative
> notation for 5/2 .

Yeah, that's why I said "maybe" for these.  The same goes for `∞':
you'd actually want not only that and `-∞' -- you'd also want `+∞'
too, and the fact that you want all of these to be available for
fractions too makes it very clear that a reader thing is more proper.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.