[racket] syntax, differently

From: Hendrik Boom (hendrik at topoi.pooq.com)
Date: Tue Nov 30 21:39:48 EST 2010

On Tue, Nov 30, 2010 at 05:56:08PM -0600, Eduardo Cavazos wrote:
> Hi Matthias,
> 
> On Wed, 2010-08-18 at 10:52 -0400, Matthias Felleisen wrote:
> 
> > Eduardo is providing a macro that helps you abbreviate complex 
> > selector and mutator chains. The BENFIT you get is that instead
> > of writing 
> > 
> >   (posn-x (bird-posn (sky-bird (world-sky some-world))))
> > 
> > you can write -- in Racket -- 
> > 
> >   some-world.sky.bird.posn.x 
> > 
> > and make Racket programs look as short as C program selectors 
> > or Java dots or Javascript dots etc. 
> > 
> > The PRICE you pay is that you annotate variables and fields
> > with struct information. That is, you have to say somewhere that 
> > some-world is a variable that always stands for a world struct. 
> > And the sky field in world has to come with information that it 
> > always is a sky-struct. And so on. 

This looks as if it might be a better match with Typed Scheme/Racket.

-- hendrik



Posted on the users mailing list.