[plt-dev] some Racket proposals & implementation
At Mon, 5 Apr 2010 10:31:42 -0400, Sam Tobin-Hochstadt wrote:
> On Mon, Apr 5, 2010 at 10:21 AM, Robby Findler
> <robby at eecs.northwestern.edu> 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.
>
> We should also recall that almost all Racket programmers in the near
> future will be people who already know PLT Scheme, and we shouldn't
> throw away their (our) intuitions without strong reasons. Switching
> to #:super for the much-less-common case is very different from
> changing the syntax in a significant way.
>
> Also, for the foreseeable future, lots of people will program in
> student languages where `define-struct' will have the syntax it has
> now, using a textbook that uses that syntax as well. I think this
> installed mind-share suggests keeping the basic structure of the
> syntax the same.
I'm sympathetic to this argument, but doesn't it argue equally well
against changing the name of the constructor bound by `define-struct'
(i.e., dropping the `make-' prefix)?
A related problem: What do we do with languages like `slideshow' and
`scribble', which currently build on `scheme'? If all we change is the
default printing mode, then it probably won't break any Slideshow or
Scribble programs to simply switch `slideshow' and `scribble' to build
on `racket' instead of `scheme'.
So, I'm starting to think that we should leave `define-struct' alone
(for backward compatibility) and use a different name for structure
types in Racket...
It occurs to me that, among our bindings with `struct' in the name, the
one called `define-struct' is actually misleading. It binds a structure
type, not a structure. (Along these lines, SRFI-9 gives you
`define-record-type', not `define-record'.)
The name `define-struct-type' would be more accurate, and it's
conveniently different from `define-struct', but it's long. Is there
something shorter (and not `define-struct') that would be a good
abbreviation of `define-struct-type'?