archives

Syntax Design

I am in the process of designing a few domain specific languages. Thus I wondering about if people have suggestions about the design of syntaxes. It's generally not a topic of LtU. Nonetheless it is a practical problem for language designers. In a few cases, syntax does make a difference. e.g. Python and Lisp. Maybe it's a vague question. However I don't know how I could bring orderness to this topic.

please help add entries to FreeTechBooks.com

Chris Double's recent post mentioning Thinking Forth reminded me of FreeTechBooks.com.

Looks like a good place for everybody to check and add their entries, in case they haven't been submitted yet.

For example, neither of the two books mentioned recently by Ehud is listed in the Common Lisp category yet.

Invariants/Contracts vs. types

I noticed the new (to me) language "Qu" chooses to implement type-checking via invariants (see http://centrin.net.id/~marc/example.html).

(invariants, contracts, validators - all refer to the same thing here. any further names?)

Since this is more expressive and potentially "safer" than any typing systems I'm aware of, I'm wondering

  • how much prior work has been done on such systems?
  • why isn't this more common as a safety mechanism in dynamic languages?

  • and perhaps more difficult:
  • what is the "most complex" STATIC type system currently around, in terms of doing compile-time analysis for such value-constraints?

This appears to have been discussed very briefly here, but maybe I missed something.