The Artima Developer Community
Sponsored Link

Heron-Centric: Ruminations of a Language Designer
Lua and HeronScript
by Christopher Diggins
October 18, 2005
The Lua programming language is an extension programming language, which holds special interest to me and anyone who is implementing any kind of interpreter.


I have been studying Lua for the last several days, as a possible engine for the HeronScript interpreter.

HeronScript is a strict subset of the Heron language. It is intended as a way for programmers to extend their applications on the fly, for debugging, testing, user-side scripting, etc. (yes, I was inspired by Smalltalk),

Implementing HeronScript is a lot of work, but I recently realized that I could save a lot of work by using Lua as a backend. What I am considering doing is converting HeronScript into Lua and calling the Lua C Api functions to do the work of managing variable and function names for me. The only major difference between HeronScript and Lua is that HeronScript is statically typed, but I can achieve the same effect by inserting type-checking function calls into the generated Lua source.

It seems to me that anyone who wants to implement a scripting language, might want to consider this approach of converting to Lua, and using the Lua interpreter as a back-end. The only thing I need to do now is figure out whether the work needed to convert HeronScript to Lua, is signficantly less than building an interpreter from scratch.

Talk Back!

Have an opinion? Readers have already posted 3 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 ( ). Christopher is the co-author of the C++ Cookbook from O'Reilly. Christopher can be reached through his home page at

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

Sponsored Links


Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use