[racket-dev] [plt] Push #23119: master branch updated

From: Jay McCarthy (jay at racket-lang.org)
Date: Tue Jul 26 14:53:45 EDT 2011

On Mon, Jul 25, 2011 at 12:38 AM, Eli Barzilay <eli at barzilay.org> wrote:
> Some comments:
> (1) why `se-path' and not some `xexpr-path'?

The 's' was intended to be 'simple'

> (2) also, it looks bad to use a keyword to look for something that is
>    a symbols.  How about something like: '(form input #:attr name)?
>    Or maybe think of each element as a kind of a selector, with
>    integers specifying the nth element of a list and symbols do an
>    assq-style search, so that becomes '(form input 0 name)?

This is really quick and dirty for what I need. In my mind, the
"correct" thing to do is use the sxml2 package and get real XPath
queries, but this lightweight.

> (3) I really think that there should be better support for tests in
>    the documentation...  I've played with it in the past, and I
>    noticed that you have the same (pretty verbose) code in both the
>    documentation and test (of the test).

I 100% agree. Perhaps facets can make this easier.

> (4) any reason for this:
>      (define (test-add-two-numbers -s>)
>        (define x  ...)
>        (define xs ...)
>        (define y  ...)
>        (define ys ...)
>        (define r0 ...)
>        (define k0 ...r0...)
>        (define i0 ...r0...)
>        (define r1 ...k0 i0 xs...)
>        (define k1 ...r1...)
>        (define i1 ...r1...)
>        (define r2 ...k1 i1 ys...)
>        (define n  ...r2...)
>        ...)
>    over `let*' or just `set!'?  (The latter is kind of obvious since
>    you're writing what the set!-using code conceptually expands to
>    anyway...)

Because I dislike set! so much, I often program in single-static
assignment. It would be *really* nice if we could have define* from
racket/package in any definition context, because that's more like
what I really want anyways.


Posted on the dev mailing list.