Live data from Hacker News

JavaScript is not suitable for large web apps

blogs.adobe.com

141–150 of 218 posts

Re: JavaScript is not suitable for large web apps

#141
post #137

There are reasonable objections to JavaScript, but this is inane. He uses an example of someone committing a classic mistake in software design. This error would be the same in JavaScript or Java. I'd like to see how his ActionScript translation magically fixed it. However, the remedies for the mistake differ in each language. It is somewhat difficult to fix it in Java's statically typed straightjacket (which I assum…

Algebraic data type http://en.m.wikipedia.org/wiki/Algebraic_data_type

Which is t3h awesome, but not an option in either language under consideration, as far as I know. Unless you used a Haskell-to-JS compiler. I apologize if I implied that static typing = Java's kind of typing.

Re: JavaScript is not suitable for large web apps

#143
post #141

Earlier quoted context omitted.

Algebraic data type http://en.m.wikipedia.org/wiki/Algebraic_data_type

Which is t3h awesome, but not an option in either language under consideration, as far as I know. Unless you used a Haskell-to-JS compiler. I apologize if I implied that static typing = Java's kind of typing.

js_of_ocaml

http://ocsigen.org/js_of_ocaml/

Re: JavaScript is not suitable for large web apps

#144
post #141

Earlier quoted context omitted.

Algebraic data type http://en.m.wikipedia.org/wiki/Algebraic_data_type

Which is t3h awesome, but not an option in either language under consideration, as far as I know. Unless you used a Haskell-to-JS compiler. I apologize if I implied that static typing = Java's kind of typing.

Java doesn't have pattern matching or nice tuple syntax but it does have Algebraic Data Types. Abstract classes are sum types (the dervived classes are the variants) while interfaces are (awkward) product types.

Re: JavaScript is not suitable for large web apps

#146
post #137

There are reasonable objections to JavaScript, but this is inane. He uses an example of someone committing a classic mistake in software design. This error would be the same in JavaScript or Java. I'd like to see how his ActionScript translation magically fixed it. However, the remedies for the mistake differ in each language. It is somewhat difficult to fix it in Java's statically typed straightjacket (which I assum…

>In my experience most Java developers don't even do that. They...

It's awesome how, on Hacker News, people whose job require them primarily write code in Java are some sort of stupid luddites ready to be easily generalized as the worst kind of programmer. Way to stay objective, guys.

Re: JavaScript is not suitable for large web apps

#147
>The code naturally distributed itself from about 10 files to over 100 files when creating ActionScript classes. ... I don’t know why but JavaScript programmers tend to put all of their code into few files.

Good JS programmers don't. Classes and inheritance work fine in JS.

>Just to be clear: You can write bunny-and-toaster code in ActionScript, too.

Right. This rant isn't about a bad language, it's about bad development practices.

Re: JavaScript is not suitable for large web apps

#148
Javascript forces everybody to use the same language, while there are so many people who are religiously fanatical about their own little pet language. So, yes, to whomever it applies, go ahead and cross-compile from whatever you like to Javascript and let's put an end to the problem.

Re: JavaScript is not suitable for large web apps

#149

Earlier quoted context omitted.

I haven't switched to coffeescript but I have worked on several coffeescript codebases. Its not the end of the world, but I don't prefer it. It is an unnecessary level of abstraction and is fragmenting js. It also seems the coffeescript users tend to use haml and sass as well. When I am working on those projects I feel like I am drowning in preprocessors and frequently encounter cryptic errors as a result.

I can't speak for haml, but sass is certainly a welcome tool in dealing with CSS, since it mostly uses CSS syntax, with sensible nesting to keep things orderly. sass takes what you already know and kicks it up one notch (perhaps two, if you want to use variables).

Agreed, sass (and compass) mitigate some of the css pain.

Re: JavaScript is not suitable for large web apps

#150
The author has failed to put any effort into trying to prove his assertion that the language is at fault. I've seen bad code in all sorts of languages. A rewrite will naturally produce cleaner code, so I don't see how this proves anything about the language itself.

Despite this, there is some truth to the assertion that JavaScript projects can be unwieldy. The main issue with large scale JavaScript development is the lack of a built in module system. The naive style of using a global namespace and script tags is prone to resulting in difficult to maintain code. Thankfully there are frameworks that can solve this issue.

Post reply on HN