Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

javascript vs lua

Name: Anonymous 2012-01-24 20:47

let's say i might be working on something ``secret'' and i want to embed a scripting language that isn't too off the wall for end users. i hear luajit is kinda fast and v8 is really fast and speed would be quite nice since user scripts might be called hundreds of thousands of times in short timeframes

i've heard javascript has better semantics and is generally more pleasant to use, but i want /prog/'s opinion so i don't fuck up and regret it later

Name: Anonymous 2012-02-11 18:19

>>102
i like the weak maps bit:
- they're exclusively weak-keyed
- they aren't enumerable, because the gc collecting fields would fuck up the iteration

in contrast to lua's weak tables (a paper on which is even mentioned in the wiki entry):
- they can be set to be weak-keyed only, weak-valued only, or both
- they can be enumerated, because next/pairs will not get confused if fields suddenly go missing

so that's at least one javascriptified feature

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List