[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lexical environments
- From: Florian Weimer <fw@...>
- Date: Wed, 03 Feb 2010 20:53:58 +0100
* Tony Finch:
> Douglas Crockford argues that programming languages should not have
> reserved words. His idea is that if you happen to give a variable
> the same name as a keyword, then that keyword becomes unusable in the
> variable's lexical scope. If you use a keyword in a given scope then you
> cannot subsequently declare a variable with the same name.
Many languages have quasi-keywords which are only reserved in some
contexts. I doubt it's worth the complexity, and it makes good error
messages much harder. And his proposal works only for languages which
end scopes with something that doesn't resemble identifiers at all
(such as indentation or some parenthetic construct).