Live data from Hacker News

For modern development Javascript indeed is a shit language

live.julik.nl

171–180 of 243 posts

Re: For modern development Javascript indeed is a shit language

#171
post #58

I have always wondered why so many people like dynamically types languages... I mean, if I have a variable I ALWAYS know what kind of data I expect in it. If I try to use different kinds of data in the same variable then something is clearly wrong - either with me (for wanting that) or with the way I use the variable (and I would appreciate some warning about it). The problem is that you hardly have a choice nowadays…

> ObjectiveC) has the best design decisions (IMHO). ARC instead of manual memory management or GC, strongly typed but still allows generic object pointer (id),...

It's funny, because objects in Objective-C are dynamically and weakly typed, and as flexible as in JS. The syntax has unnecessary rigidity that doesn't map well to actual semantics of the language.

Message passing in ObjC doesn't care about types (you can send any message to any object, and the receiver can capture the message and do whatever it wants). You can change/add methods (and "associated" properties) at run time, of instances and class definitions, just like in JS.

e.g. Cocoa bindings will subclass your objects (create a new subclass at run time and swap identity of your object) to replace setters with ones that notify the UI.

https://developer.apple.com/library/ios/documentation/cocoa/...

Re: For modern development Javascript indeed is a shit language

#172

Here we go again. Let's enumerate the technologies which are shit: HTML is horrible CSS is an abomination HTTP is wasteful, slow and old C++ is a horrible language (Linus Trovalds) C is dangerous Java sucks .. I'll stop there and let you expand the list if you want. Turns out the whole computing world is built on top of this terrible tech which many people hate, yet somehow it's moving forward.

Turns out the whole computing world is built on top of this terrible tech which many people hate, yet somehow it's moving forward.

Well, yes. Your hyperbole is actually the current state of affairs. Progress doesn't mean the things you're building on are good, just that they can be made to work. In fact, progress is the evolutionary process of throwing away some of the old stuff, calling it shit, and replacing it with the new hotness.

Re: For modern development Javascript indeed is a shit language

#173
post #149

I'm so tired of hearing how bad JS is as a language - guess what, it doesn't metter. The ecosystem and community is absolutely amazing and that's something you just can't beat - all the well documented, polished and maintaned libraries, frameworks etc, the amount of books, guides, conferences and so on, the ability to use JS everywhere, tools, services, cloud based solutions and much, much more. That's why people cre…

Yeah, same here. I have no difficulty writing large scale apps in JS because I play to its strengths and manage its weaknesses. These shit-for-brains "experts" can't, and somehow it's all the language's fault. Here's a clue folks: you're the programmer, it's your job to work out how to programme for your target platform, and if you can't then fuck off and leave it to the professionals.

"it's your job to work out how to programme for your target platform" - exactly, but there is an active effort to try and put the JS garbage on each and every target platform!

Re: For modern development Javascript indeed is a shit language

#174
post #77
post #17

Earlier quoted context omitted.

I see this all the time. JS is slow because of the dom. No. JS is slow because JS is slow. Yes, I know V8 makes it faster than it used to be. Yes I know it is neck and neck for computation, but because of the way memory is handled it is slow for loading large dictionaries. But I could forgive all of that. JavaScript is not well designed for work in a team environment, nor is it well designed for Large Code Bases. But…

>> JS only picked up steam because Flash died. Not because it was a great language. If it were a great language people would have started optimizing it 5 years ago. It isn't. So they didn't. The new optimizations are out of necessity. And because it lets front end pretend to be backend. That may sound snobby, and it is, but JS for backend is like writing in Visual Basic. These days you can do anything in it, it will…

The problem is that JS is a monopoly. Monopoly is never good.

Re: For modern development Javascript indeed is a shit language

#175
post #9
post #6

Aren't all these rants about programming languages as sterile as debating whether Spanish language sucks because it is not as regular as Italian language ? I really don't get it, people keep attacking issues of javascript or php. Fact is: 1) people use the languages of their choice to make programs. 2) Programs work, no matter as shitty the program is reputed to be 3) why look further ? My view is: instead of ranting…

> why not instead dissect what we do with them: programs, and find ways to improve them ? The way to improve a lot of programs is to write them in a different language.

Another way is to fix/tune the algorithm

Re: For modern development Javascript indeed is a shit language

#176

Here we go again. Let's enumerate the technologies which are shit: HTML is horrible CSS is an abomination HTTP is wasteful, slow and old C++ is a horrible language (Linus Trovalds) C is dangerous Java sucks .. I'll stop there and let you expand the list if you want. Turns out the whole computing world is built on top of this terrible tech which many people hate, yet somehow it's moving forward.

All I know after years of being in the tech industry, every programming language ever invented has pissed off enough people that no one should ever use each language. I'm quite sure that languages not yet invented has already pissed enough people already that they'll be hated the day they are released.

Personally, I find such people childish in a way.

It's a tool in a toolbox. I've never seen a mechanic rant about the substandard design of a standard screwdriver because he pulled it first despite actually needing a phillips screwdriver.

Re: For modern development Javascript indeed is a shit language

#177

Earlier quoted context omitted.

It outperforms Python at everything except where Python just calls a C function. Ruby (especially the recent releases) is on par with Python speed, if not faster. But neither is close to JS.

"My pet is fast because it can beat a turtle and a slug in a race"

Lol. Seriously though, show me a dynamic language (other than Lisp) that's even half as fast as Javascript...

Re: For modern development Javascript indeed is a shit language

#178

Earlier quoted context omitted.

Keep up the good work! I still think the main point around javascript is the type system or the lack thereof. I don't mind dynamic typing, but the javascript data types are central to all HTML5 APIs and most existing libraries. CoffeeScript gets this right, many others don't.

> CoffeeScript gets this right, many others don't. I'm not sure what you mean by that — as CoffeeScript's "type system" has no difference from JavaScript's.

Exactly.

Re: For modern development Javascript indeed is a shit language

#179
post #157
post #101

Earlier quoted context omitted.

Are there any compile-to-JavaScript languages out there, which do this? I read about function* and yield, but this seems to require all functions to be rewritten. Also I don't quite understand how this accomplishes to run 2 functions in parallel, if they are async.

Here are a couple : Saltarelle - C# to JS compiler: http://www.saltarelle-compiler.com/documentation/supported-c... Funscript: http://funscript.info/samples/simpleasync/index.html

Thank you!

Are there any non-ms solutions?

Re: For modern development Javascript indeed is a shit language

#180
post #20
post #7

Earlier quoted context omitted.

How do you handle Javascript ignoring wrong numbers of function arguments? Do you use a linter to catch this sort of thing? This part of Javascript sounds the most absolutely insane to me: Silencing an error like that is catastrophic.

Is this so much of a problem that we need to re-design JS to handle it? Why not just avoid making this mistake in the first place by reading the code? Not to sound dismissive - but if you're making these kinds of mistakes regularly enough to irritate you, it's not the language that's at fault. Javascript's squishiness is the thing I like the most about it. It's far from perfect, just like any other language out there…

> Why not just avoid making this mistake in the first place by reading the code?

We're talking about programming errors. Are you suggesting the solution to human error is to just not make errors??

Note, of course, that wrong arguments will frequently not arise from a function call you just wrote -- but from changes in the code.

Say you merge in a trivial merge of some code, which changed a function's signature/parameters. The merge succeeds trivially. Now every single function call is a bug that is not only uncaught by a compiler. It won't even necessarily be caught at runtime. Instead, it may escalate to catastrophic, undefined/unexpected behavior.

Post reply on HN