From: "Jörg W Mittag" Date: 2010-02-13T09:20:05+09:00 Subject: Re: embedding ruby Albert Schlef wrote: > Jörg W Mittag wrote: >> [...] But really, I would look at Lua, because >> while you can find a Ruby *implementation* that is specifically >> designed for embedding, this doesn't change the fact that the Ruby >> *language* isn't. > What do you mean? What is there in the language itself that hinders > embedding? Everything that you don't need. That's kind of a dick answer. What I mean by that is that when you embed a language into an application, this is usually a very special purpose deal. Which means that all the stuff which makes Ruby *brilliant* as a general purpose language, can get in the way. Do you really need an almost Turing-complete Regexp implementation in a CAD program? Or text processing? Do you need Database I/O in a game AI? Arbitrary precision integers in a text editor? Lua is often criticized for its small (to almost non-existent) standard library (compared to Python, Ruby, Java, .NET), but when the main purpose is as a special purpose embedded language, then there simply isn't that much "standard" functionality that you could put in a standard library. What do Adobe Lightroom, World of Warcraft and NginX have in common that you could put there? Lua is designed in such a way that the embedding program *is* the "standard" library (or more specifically *provides* the library). Ruby comes with "batteries included" which is really great if you want to run it autonomous, but is just annoying when you want to hook it up to your application's power supply. jwm