evan_tech

Previous Entry Share Next Entry
I linked to Daniel Grossman’s thesis in evan, while it really belongs here.
Basically, he retrofits C with some extensions to increase compile-time safety (and consequently efficiency). This is illustrative:
...These techniques [type variables for polymorphism] are are well-known in the theory of programming languages and high-level languages like ML and Haskell. Adapting the ideas to Cyclone was largely straightforward, but this dissertation explores some complications in great depth.
There’s more than that to it, of course.

I’ve always been curious about ML for that reason (I just installed it again last week to try using it again) and I first became curious about programming languages outside of the popular set (C, Perl, etc.) from graydon writing about Haskell... I never follow through because I never have an application to build with these languages. But now, ten minutes later, a good one just occurred to me: another Brainfuck->x86 assembly compiler. I wrote that Ruby one so I know most things work, and I always read ML is good for compilers...


Obligatory superficial Cyclone note: I like their idea of two different types of pointers: they use *, like C, for potentially-null pointers, and @ for pointers that can never be null (which can be determined through flow analysis). The latter means that you never have to check for null, while the former reminds me of that “Maybe” stuff in Haskell that monad paper was talking about.