[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: need for macros (was Re: Icon)



Guy Steele agreed with Lauri Alanko:
> You can indeed "get surprisingly far without macros" when
> everything, including functions, is a first class value.

What are the factors arguing against first class values, i.e. why would a
language not simply make everything a first class value?

A couple I can think of:

* Performance - aside from any direct costs involved in exposing something
as a first class value, structures relied on internally by a language may
create optimization problems if exposed as first class values, since they
may then be subject to manipulations that can't be predicted as easily.  A
notorious example of this, I believe, are continuations; another might be
environments.

* "Too much power" - for languages targeted at a general audience, features
that allow significant toying with features intrinsic to the functioning of
the language may be considered too dangerous.  For example, it's easy to
come up with arguments against unrestricted first-class continuations in a
general-consumption language, if one is inclined towards protecting
programmers from themselves.

But assuming a goal of creating a maximally powerful language for "do not
try at home, use at own risk" scenarios, is there any reason aside from
performance to avoid first class values?

Anton