[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questions for a language designer
> ...
>
> - Think hard about iteration, especially over collections.
> If all collections obey a uniform iteration protocol,
> it means that you can do things like 'for e in c ...'.
> Note that if iterators are done in a first-class way,
> this has performance implications that your compiler
> needs to worry about.
> - Do you want macros? Lisp-style macros? Dylan-style
> pattern-matching non-procedural hygienic macros?
> Scheme-style 'syntax-case' pattern-matching procedural
> hygienic macros? This says a lot about the syntax of
> your language, and it also says a lot about the model
> you choose for compile-time evaluation environments.
> - What syntax do you want? Parentheses unaccountably
> give lots of people hives, but S-expressions make a
> lot of things much simpler. Infix syntax is quite
> nice when it's done well, but you've got to get the
> "kernel" of that exactly right if you want your infix
> macro system ever to be usable. If you decide on
> S-expressions, should they be represented as lists
> and conses, or do you wany a first-class object for
> that?
>
> ...
- What's the metaphor? Although the days of the "pure"
languages are mostly gone, I believe it's still worthwhile to have a
good sense of the core language mental model, e.g.:
FOL (Prolog), Objects (Smalltalk, etc.), Functions (lots), PDP-11 (C) :-),
Production System (OPS5, etc.).
Different core models influence the "natural" styles of program development
in different languages even if the set of available facilities is
similar. They
also help define which late-arriving features will "fit" and which will
be warts.
--Jerry