Skip to content

Comment on Metaprogramming: Ruby vs. Javascriptparent

Comments

It can seem like a weak language since it doesn't have "batteries included", but the whole design revolves around using it as a drop-in library in an existing C / C++ project (which would already have libraries) or extending the language with C. It has a great C API, and it's not hard to write wrappers for C libraries as necessary.

While Lua standalone is a decent language (almost a Python/Scheme hybrid), Lua + C is quite powerful. It's particularly well-suited to the two-level programming style John Ousterhout describes here (http://www.vanderburg.org/OldPages/Tcl/war/0009.html). I haven't used TCL much, but it sounds like the same development style - since you can just use another language when necessary, Lua doesn't have to do everything. It can stay small and simple. While low-level code and hotspots for a project may be written in C, the rest can be written in shell scripts, TCL, Lua, etc. for rapid prototyping. The clear boundary between the layers of development can help keep complexity contained, too.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.