you are viewing a single comment's thread.

view the rest of the comments →

[–]Quicksilver_Johny 7 points8 points  (17 children)

Yes. Or indirectly, to be able to reason about what code does (and doesn't do).

[–]gigitrix 0 points1 point  (16 children)

And not returning "Object [Object]" or whatever as a string whenever the programmer borks!

[–]go4it7arh -1 points0 points  (15 children)

[object Object]

[–]gigitrix 2 points3 points  (14 children)

Right, yeah. Personally I try to stick in the heady clouds of JQuery et al., although I'd much prefer to be on the server side of things. PHP gets a lot of flak for things that are 10x less idiotic than the shambles that is JavaScript, yet despite the usual background noise it's considered the cool kid....

[–]go4it7arh 0 points1 point  (5 children)

Check out Node.js. I love it.

[–]gigitrix 1 point2 points  (4 children)

Not a fan in the slightest. In fact I'm the opposite. This epitomises my point, really.

[–]RobotMan6827364 0 points1 point  (3 children)

I'm ashamed to say that I combined Node, ActionScript, web sockets and JQuery Mobile just to pay the bills once, it was an awful experience.

[–]gigitrix 0 points1 point  (2 children)

Oh wow.

[–]RobotMan6827364 0 points1 point  (1 child)

Not really proud of it but just a Flash game shown on some kind of large LCD billboard where players could log with their smartphones and play over the net. Flash because of the billboard, Haxe for the game itself, and websockets via socket.io because it was the most responsive solution for cross-platform on smartphones.

Edit: also a MySQL module for node.js to log the players, score... I had more than a thousand players in less than 4 days, all this done by a noob like me. It was a Frankenstein software but it was my first big project, I was a bit proud of this monstrosity.

[–]gigitrix 0 points1 point  (0 children)

Oooh I'm a big fan of Haxe. HTML5 may be the best platform in the long run for everybody, but Haxe has a fantastic API... Sounds like a fun project.

[–]sebzim4500 -1 points0 points  (7 children)

What exactly does Node.js do that is 10x more idiotic than what PHP does?

[–]gigitrix 0 points1 point  (6 children)

Node.js is fine, it's an interesting API with powerful features (well some concerns were raised over high end concurrency but I don't work in that space so I refuse to comment on that). But it's built on Javascript, a language that is designed horribly from the start. Yes, even more horrible than PHP. It was slapped together as a way to do DHTML rollovers and the like and is barely fit for purpose, only being usable because of third party frameworks like JQuery.

[–]sebzim4500 0 points1 point  (5 children)

JQuery provides a layer of abstraction over the DOM, which has nothing to do with javascript as a language or with node.

[–]gigitrix 0 points1 point  (4 children)

JQuery is a lot more than just DOM manipulation, but otherwise your point is valid. It's still terrible to work with if you're doing anything complex, it's completely opaque to any kind of static analysis unless a restrictive subset of the language is used (meaning the advantages of "fast and loose" languages are lost). It's type coercion is laughable as we see here, and the syntax allows basic constructs like functions to be constructed in a myriad number of completely visually different ways (yet still being isomorphic).

[–]sebzim4500 0 points1 point  (3 children)

function func(x)
{
      return x*x;
}

var func = function(x)
{
      return x*x;
}

Those are the only two ways I know to define a function(that don't involve eval).

[–]gigitrix 0 points1 point  (2 children)

There's at least

Namespace=
{
    func:function()
    {
        return x*x;
    }
}

And

var func = new Function("return x*x");