Hacker News new | ask | show | jobs
by hajile 4474 days ago
Qt already uses JS in the form of QtQuick with quite a bit of success. JS using a prototypal system means that it can emulate almost any other OOP trivially (while the reverse is much harder).

I prefer embedding lisp, but I realize that most developers don't know that language family (which mostly defeats the point of an embedded scripting language). JS seems to be the closest widely-known languages have come to this ideal, so I'm quite happy with the prospects of using it.

1 comments

Do you happen to know an embeddable Lisp that can easily bind to C++ objects (rather like AngelScript or luabind)? I too would mostly rather a Lisp, but doing all the plumbing sucks.
If Lua's semantics are acceptable, you can make a loader that runs your Lisp in Lua. This is probably less effort than it sounds like. Moonscript is a decent example of a mostly expression-oriented language as a Lua loader, so it should be simple to make it read a Lisp instead.
Interesting approach, thank you. I don't much care for Lua (either as a language or as an API, especially when dealing with C++), but this is a pretty neat concept to think about.