The Artima Developer Community
Sponsored Link

Heron-Centric: Ruminations of a Language Designer
Types on the Stack
by Christopher Diggins
August 16, 2006
Summary
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

Advertisement

I want to place types on the stack in Cat.

I want this for two reasons:

  1. It simplifies the language syntax
  2. 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?

Talk Back!

Have an opinion? Readers have already posted 11 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Christopher Diggins adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

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.

This weblog entry is Copyright © 2006 Christopher Diggins. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us