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

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Jul 26 13:21:27 EDT 2011

+1

On Tue, Jul 26, 2011 at 1:18 PM, Eli Barzilay <eli at barzilay.org> wrote:
> Yesterday, Matthew Flatt wrote:
>> At Sun, 24 Jul 2011 14:44:24 +0200, Stephan Houben wrote:
>> > [...] I find that summing comes up sufficiently
>> > often to deserve its own compact syntax, so I propose:
>> >
>> > ;; Solution 3
>> > (require (planet "mathsymbols.rkt" ("stephanh" "mathsymbols.plt" 1 0)))
>> >
>> > (Σ ([i (in-range 1 (add1 N))])
>> >         (string-length (integer->string i)))
>>
>> I agree. Unless there are objections, I plan to add `for/sum' and
>> `for/product' with aliases `Σ' and `∏' to `racket/base' (as well as
>> `for*/sum' and `for*/product' with aliases `Σ*' and `∏*').
>
> 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.  Maybe even `½', `¼', `¾', `-½' etc...
>
> So how about some `racket/aliases' which is included in `racket' but
> not in `racket/base' and adds some/all of these?
>
> --
>          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                    http://barzilay.org/                   Maze is Life!
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93



Posted on the users mailing list.