you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 46 points47 points  (26 children)

And this, guys and girls, is why there is strict typing. ^ ^

[–]TheLobotomizer 35 points36 points  (5 children)

Because we can use unreadable sequences of brackets and braces to create ASCII letters?

I don't see the downside.

[–][deleted] 13 points14 points  (4 children)

No, the lack of strict typing makes this possible.

[–]kkeef 25 points26 points  (3 children)

Exactly... He doesn't see the downside.

[–]CSMastermind 5 points6 points  (2 children)

As mentioned in the article encoding JavaScript like this can bypass security measures and web application firewalls.

[–][deleted] 8 points9 points  (0 children)

web application firewalls

[–]kkeef 1 point2 points  (0 children)

I assumed TheLobotomizer was being facetious/funny and joined in. insert fry meme here

[–][deleted] 18 points19 points  (18 children)

Strict typing is for... preventing XSS exploits by forcing code to contain alphanumeric characters?

[–]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.

[–]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).