archives

How to do E/DSLs successfully?

It seems to me that there are some E/DSLs which work well (well enough, sometimes debatable) such as Makefiles. Then there are situations where people have E/DSLs that maybe even sound good, but end up not really working out as intended; the abstraction cannot fail to be come leaky but fast. I wonder if "business rules" tend to fall into the latter category.

Might anybody have thoughts on what tells you when an E/DSL can work? Or what approach one should take given the nuances of a particular situation? Or at least what are the aspects involved? There are some situations where you really can hand it over to non-programmers and live to tell the tale, and others where doing so is a quick route to doom.

Thanks for any thoughts.

Ada, C, C++, and Java vs. The Steelman

David A. Wheeler: Ada, C, C++, and Java vs. The Steelman

This paper compares four computer programming languages (Ada95, C, C++, and Java) with the requirements of "Steelman", the original 1978 requirements document for the Ada computer programming language. This paper provides a view of the capabilities of each of these languages, and should help those trying to understand their technical similarities, differences, and capabilities.

type derivation for 'map map', yelp

*newbie alert* I'm hoping this is a permissible question to ask here. I looked at the FAQ and it doesn't seem to explicitly disallow it. :)

[haskell]
I was learning haskell a few years ago and I was recommended mr. Hudak's book "The Haskell School of Expression". This was my first foray into functional programming and it turned out this wasn't a great book to start with. Having done some amount of Haskelling by now I regret to realize that when I see an expression like "map map" I continue to scratch my head. Hudak gives this and similar examples as exercises, but there are no solutions in the back of the book.

The funny thing is that I've written map map to map a function over items in lists contained in a list. But I still don't understand this at all:
map map :: [a -> b] -> [[a] -> [b]]
Let alone how you derive it.
[/haskell]

Design Concepts in Programming Languages

Franklyn A. Turbak and David K. Gifford with Mark A. Sheldon (2008). Design Concepts in Programming Languages. MIT Press.

I read portions of this textbook in draft form, and it's a near-encyclopedic take on programming language semantics, which includes what other textbooks on the subject are missing: a plethora of concrete examples and exercises, in the context of a series of small but practical programming languages. The book's friendly and informal tone makes even the most forbidding and formal topics seem accessible.

The linked page includes a table of contents and sample chapter.

(Disclaimer: the first author taught me most of what I know about computer science when I was an undergraduate at Wellesley.)