[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Macros and little languages
I agree with both Paul's, but there are two minor points where I want to
share something to the contrary. (I guess I found I liked green eggs and
ham.)
The two points are that macros don't have to be prefix and that static
typing has value for development.
---------------------------------
Paul Graham wrote:
> ... Now you have advanced so far that our
> only remaining gripes are the lack of macros (which I think
> will be found to require prefix notation), ...
Even as a rabid Lisper, I've been pretty happy with Curl's macro system,
which does not require prefix notation. Jonathan Bachrach's Java macros
are similar
(http://www.ai.mit.edu/projects/dynlangs/Talks/java-macros.htm).
In particular, Curl macros allow pretty arbitrary embedded syntax within
one macro definition, which sometimes has advantages over the separate
reader-macro vs. expression-macro distinction in Common Lisp.
Paul Prescod wrote:
> ...
> If we had today's computers in the 1970s, then I claim that we would
> have been using garbage collection and maybe dynamic type checking for
> the last thirty years. It wasn't that it took that long for the memes to
> spread. I took that long for the hardware and compiler technology to
> catch up. ...
I don't think you're claiming that speed (in the past) was the only
argument against dynamic typing. For the record, another reason
sometimes cited is "it may take me longer to get my program to compile
with type declarations everywhere, but when it does compile, it's more
likely to be correct."
I have to admit that this is sometimes true. Curl readily supports both
styles, but I have tended to do my RAD work without type declarations on
variables and operators. Recently though, I've been maintaining
other-people's-code and found the compile-time typing to be a great
help. This has been true more than with other "sufficiently-smart
compiler" systems I've used (e.g., CMU Common Lisp) because it's
sufficiently easy for the programmers whose code I'm extending to have
used good declarative practice over a large enough body of code to be
meaningful.