Hacker News new | past | comments | ask | show | jobs | submit login
Practical Foundations for Programming Language (2012) [pdf] (univr.it)
3 points by lainon on Dec 27, 2017 | hide | past | favorite | 4 comments



The Preface begins:

> Types are the central organizing principle of the theory of programming languages. Language features are manifestations of type structure. The syntax of a language is governed by the constructs that define its types, and its semantics is determined by the interactions among those constructs.

I'm not certain that I buy any of those three sentences. If I understand correctly, Lisp is a counterexample to all of them.

And when the first three foundational sentences are wrong, the rest of it (590 pages!) is probably suspect. I mean, there's probably a lot of valid stuff in there, but it may only apply to languages where types actually are the central organizing principle.


I don't know if you can say that Lisp is a counter example of those three things. Lisp has types and the language features are a manifestation of those types and the syntax of Lisp is, in many ways, governed by the constructs that define its types.

Even the so-called typeless languages have types, simple though they may be, as in bits and words, etc.


OK, they have types. But are types the central organizing principle of those languages? Or of a theory of those languages? If I understand correctly, the central organizing principle of Lisp is the (untyped) lambda calculus.


Lambda calculus, unless extended, has no data type other than the function (even numbers have to be built out of functions as Church numerals), and doesn't have access to its notation as a data structure. Lambda calculus has no symbol data type. We cannot fire up lambda calculus and have an interactive session in it in which almost everything is mutable. Lisp was named for "list processing"; lambda calculus has no lists: no cons, no car, no cdr. No quote to get a piece of syntax as a nested list data strucure. No eval to evaluate an expression. No apply to treat a list of items as arguments to a function.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: