Heron-Centric: Ruminations of a Language Designer Types on the Stack by Christopher Diggins August 16, 2006
I am playing with the idea of allowing types to pushed onto the stack in the Cat language. Here are my ruminations on the subject
I want to place types on the stack in Cat.
I want this for two reasons:
It simplifies the language syntax
I want to be able to have dynamic type expressions and dynamic type assignments
I am not being entirely glib in providing the first answer. It is hard to justify complex syntax, just to separate the compile-time expressions and run-time expressions.
There are not many languages where types are first class values, and I want to be very careful about making this decision. I don't want to have to reimplement the compiler for the umpteenth time.
There is potential overhead in making types first-class citizens of the language, however during static analysis most of the type expressions have the potential of being evaluated away.
I am still unsure though ... am I buying something of value, or just getting into a world of hurt and pain?
Have an opinion?
Readers have already posted
about this weblog entry. Why not
If you'd like to be notified whenever Christopher Diggins adds a new entry to his weblog, subscribe to his RSS feed.
Christopher Diggins is a software developer and freelance writer. Christopher loves programming, but is eternally frustrated by the shortcomings of modern programming languages. As would any reasonable person in his shoes, he decided to quit his day job to write his own ( www.heron-language.com ). Christopher is the co-author of the C++ Cookbook from O'Reilly. Christopher can be reached through his home page at www.cdiggins.com.