[plt-dev] some Racket proposals & implementation

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Apr 5 10:31:04 EDT 2010

Something like that seems okay. I thought the proposal was for:

(define (ufo #:posn p #:vel [vel (velocity 0 0)]))

to be a define-struct (because it has no body).

Robby

On Mon, Apr 5, 2010 at 9:28 AM, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
>
> While I agree with your sentiment -- not changing so much right now --
> I disagree with the overall evaluation. I think
>
>  (define-struct ufo moving-object (#posn p #vel (velocity 0 0)))
>
> very appealing per se, also with the even shorter syntax of using just
> define. The regularity of having both function headers and struct headers
> use the same grammar is great. (It may even pacify the grumpy old men of
> Scheme standards.) I just don't think we're ready for it now if we want
> lots of files to start with #lang racket.
>
> -- Matthias
>
>
>
>
>
> On Apr 5, 2010, at 10:21 AM, Robby Findler wrote:
>
>> I dislike this change. Brainfuck is very lightweight language too (by
>> the measures of lightweightness I've seen here recently), lets not
>> forget.
>>
>> In more politic words, it seems like making function definitions and
>> structure definitions look so similar to each other is just asking
>> Racket programmers to get confused.
>>
>> Robby
>>
>> On Mon, Apr 5, 2010 at 9:18 AM, Matthias Felleisen <matthias at ccs.neu.edu>
>> wrote:
>>>
>>> On Apr 4, 2010, at 10:37 PM, Eli Barzilay wrote:
>>>
>>>> On Apr  4, Matthias Felleisen wrote:
>>>>>
>>>>> On Apr 3, 2010, at 8:19 PM, Matthew Flatt wrote:
>>>>>
>>>>>> I like
>>>>>>  (define-struct (a x y) #:super b)
>>>>>> much better than the current
>>>>>>  (define-struct (a b) (x y))
>>>>>> but I'm not sure that it's worth changing.
>>>>>
>>>>> The issue I brought up in Boston was the 'heaviness' of the looks of
>>>>> our code, which to some extent is caused by long names. Going from
>>>>> (make-a 0 1) to (a 0 1) is a good weight loss. The above seems to
>>>>> call for trouble for a minor advantage.
>>>>
>>>> I think that there *is* some weight loss here too -- one that is
>>>> similar to loss of moving from `mzlib/kw' to the current syntax.
>>>> Specifically, there's a whole bunch of struct features that you get
>>>> with no need to remember anything more than "use `define-struct'
>>>> instead of `struct'".  It's also the same kind of win as "use `for/*'
>>>> instead of `let'" that makes the current iterators so good (as opposed
>>>> to the srfi or the swindle or the CL syntaxes).
>>>
>>>
>>> Yes, using a plain function header to specify structures (without body)
>>> is very nice because you get all these things (keywords, initialization)
>>> for free. But then we're back to the balance of change vs getting Racket
>>> out. -- Matthias
>>>
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://list.cs.brown.edu/mailman/listinfo/plt-dev
>>>
>
>


Posted on the dev mailing list.