JavaScript is the programming language of the future, the programming language for people, the official programming language of the planet Earth!
Add JavaScript!
Re: Add JavaScript!
I thought that was supposed to be Java.
In any case, we're likely adding Lua support for custom scenarios.
Re: Add JavaScript!
Oooh that's good, I have experience with lua.
- velociostrich
- Dragoon
- Posts: 318
- Joined: Thu Mar 08, 2012 6:24 pm UTC
Re: Add JavaScript!
I don't think any JavaScript interpreter could be fast enough for our needs, though there was a modified version of Sauerbraten called Systensity that had Google's v8 interpreter zip-tied and duct-taped to it. My problem with JavaScript is the mutability of every function/object; you need a hash table for every instance and every class, and somehow you need to store all that data in a readily mutable way, which means linked lists that get changed a lot. I think a simpler language would be much more appropriate for us considering that performance is a serious issue.
Re: Add JavaScript!
velociostrich wrote:I don't think any JavaScript interpreter could be fast enough for our needs, though there was a modified version of Sauerbraten called Systensity that had Google's v8 interpreter zip-tied and duct-taped to it. My problem with JavaScript is the mutability of every function/object; you need a hash table for every instance and every class, and somehow you need to store all that data in a readily mutable way, which means linked lists that get changed a lot. I think a simpler language would be much more appropriate for us considering that performance is a serious issue.
The problem is, JavaScript has been prescribed for PEOPLE by the Global Government and there's a possibility that all other languages and platforms except HTML5 and JavaScript will be banned.
- velociostrich
- Dragoon
- Posts: 318
- Joined: Thu Mar 08, 2012 6:24 pm UTC
Re: Add JavaScript!
lamefun wrote:The problem is, JavaScript has been prescribed for PEOPLE by the Global Government and there's a possibility that all other languages and platforms except HTML5 and JavaScript will be banned.
Is there a reason you like to waste our time?
Re: Add JavaScript!
LOL. JavaScript is an {
abomination
}
of a language (so many curly brackets!).
ON a more serious note, since you intend to integrate some form of scripting, what do you think of Ruby? I won't even link you to it, it's so famous as it's so excellently designed. The 'poor performance' of Ruby is a long-running myth that is no longer true as of Ruby 1.9, which uses merged the reference implementation with YARV and made some changes to the syntax. It also started working well with Unicode, and no problems exist with that.
Ruby is probably the most well-designed language I have ever used. Please take a look at using it instead of Lua for scripting! Much friendlier than Lua's ubiquitous but difficult-for-newbies C-like syntax, too. Not to mention that Lua does not support objects.
Re: Add JavaScript!
velociostrich wrote:I don't think any JavaScript interpreter could be fast enough for our needs, though there was a modified version of Sauerbraten called Systensity that had Google's v8 interpreter zip-tied and duct-taped to it. My problem with JavaScript is the mutability of every function/object; you need a hash table for every instance and every class, and somehow you need to store all that data in a readily mutable way, which means linked lists that get changed a lot. I think a simpler language would be much more appropriate for us considering that performance is a serious issue.
With a modern JIT compiler ( Mozilla's Jaeger/IonMonkey, Webkit's DFG, Google's V8 ), JS is one of the fastest dynamically typed languages available.
The way you describe JS working is completely and totally wrong to a modern implementation of the language.
Using an interpreter will of course be a lot slower than using a JIT, but this is true for all languages, not just JS.
The biggest problem with JS is its lack of a standardized way to communicate with C code.
Lua is much better in this respect.