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-01-27 0:19

Okay, but who really cares about these addition edge cases? Yeah, the plus sign is overloaded with meaning. That's because the natural expectation for adding two strings is concatenation.

But is it so obvious with arrays? Do you want to concat them, sum them, or treat them as strings (and therefore, concat them)?

And what about objects? Are you comparing them as hashes, or as an instance you want to extend with another (concat)?

There is an underlying logic to it in Javascript (valueOf, toString), so it's only incomprehensible until you take the time to comprehend it. But more importantly, there's no reason to have an expectation, because only an idiot would think the + should be expected to read your mind about what you want to do.

What happens if you put aluminum foil in an inkjet printer? I don't fucking know man, but that's a retarded idea, because printers are intended to work with paper. In theory you could do it, but you'd be a dumbass to do so. There are other ways to get ink onto surfaces that don't present the same limitations due to streamlining.

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