28 ms·
For modern development Javascript indeed is a shit language
- talles 13y agoMost of the comments in the article are about the horrible footer. Gosh, is indeed an awful footer. Oh by the way I agree with half of what he said (just half) but I still enjoy javascript.
- julikt 13y agoHey folks, thanks for all the constructive criticism and death wishes. Will do my best to respond in detail - but for now I've removed the fixed footer. Deployment from the train FTW.
- swaagie 13y agoTo me it seems the author is expressing his own inability to code in the language, why discuss someone's opinion?
- k__ 13y agoIs Dart an alternative for those problems? Edit: I mean stuff like "callback hell", does it allow me to programm normally and still avoid blocking the loop?
- Peaker 13y agoHaskell allows that.
- Lazare 13y agoIf you're doing frontend dev, then you must use Javascript or a language which compiles to Javascript. I believe Dart currently has a mostly functional tool to compile Dart code to Javascript. As for callback hell, Dart has "Futures" which are basically Promises. If you like Promises, you could use Dart...or one of the many excellent Promise libraries for Javascript; the syntax is almost identical. (The linked article savages Promises for no obvious reason. I happen to like the syntax. In any case, Dart uses the same syntax, so if you buy the articles criticisms, Dart is no panacea.)
- nbevans 13y agoThe "syntax" of promises in JS and Dart isn't really a syntax. They are library features in the form of fluent method chaining. This is merely a library pattern, it is not a syntax. A syntax would be something like the async/await support in C#. Or the async and let!, do! etc along with pipelines in F#.
- k__ 13y agoAre 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.
- balakk 13y agoHere are a couple : Saltarelle - C# to JS compiler: http://www.saltarelle-compiler.com/documentation/supported-c-language-features http://www.saltarelle-compiler.com/documentation/supported-c... Funscript: http://funscript.info/samples/simpleasync/index.html http://funscript.info/samples/simpleasync/index.html
- k__ 13y agoThank you! Are there any non-ms solutions?
- balakk 13y agoFunscript is not really MS - it's done by a third-party developer, and F# itself is open-sourced under a very liberal license, and runs well on Xamarin/Mono in OS X. I don't think there are direct equivalents in other languages, although similar approaches exist. Checkout Elm for example: http://elm-lang.org/Examples.elm http://elm-lang.org/Examples.elm
- Lazare 13y agoA valid point; that just seemed like the easiest way of phrasing it to me. Anyhow, what I was trying to say is that the linked article trashes Promises, and Dart has Promises, so Dart is at least in that respect not a solution.
- gkoberger 13y agoPersonally, I disagree. I find JavaScript to be the most "write-able" language, and switching to Node + frontend JS as my main language (I've done Python, Ruby, PHP, Java and C++ as jobs) has been the best thing I've done in a long time. Express and Angular are amazing. Sure, it has a bunch of quirks. Sure, it's not good for everything (I do mostly relatively simple CRUD apps). Sure, in the browser, it gets slow when the DOM is involved. Sure, this is hardly a rebuttal of the points in the original article. But, still, I love JavaScript. I think the problem is that the author is writing JavaScript as though it's Ruby. A JS developer switching to Ruby would have similar problems.
- Peaker 13y agoHow 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.
- gkoberger 13y agoIt's just never been a problem for me, I guess? I know how it works in JS, so I either ignore it or use it to my advantage (the JS equivalent of overloading). You seem to come from a more strongly-typed background, but I've never once found the way JS handles it to be "catastrophic".
- Peaker 13y agoHow do you ignore it? Ignoring it means accepting cryptic bugs that result from signature changes. You say "use to your advantage", but what's the advantage? You could have a "*args" like Python, and get the benefits without the (huge) drawback. The typing debate is mostly about how much effort we should exert to catch errors at compile time rather than run time. In JS, it is much worse: It defers error catching forever, and never even catches them at all! It converts them to silent bugs, instead :(
- powatom 13y agoIs 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 - but it's fun.
- tluyben2 13y agoNo matter if I agree with this or not; why the stab at Java there? I'm not sure what the resemblance, besides the name, is here? Or does OP just dislike Java (for some completely different reason) and could it just have as well been Perl or PHP or whatever a lot of people don't like?
- Ygg2 13y agoDate API (old, not the new one that is arriving) was taken from Java. And Date library in Java is frankly... horrible.
- Kiro 13y agoI'm very glad JavaScript is the language of the web. It has a combination of things I like that I don't find in many other languages: * lexical scope * first-class functions * prototypal inheritance
- tomlu 13y agoNot many languages have prototypal inheritance, but most modern languages have first class functions these days. And what sane language uses dynamic scoping?
- pmelendez 13y agoDo you mean lexical scope? Scheme has it and it is awesome. If you think it is not a good feature you should grab a SICP and see the magical stuff you can do with it.
- me_bx 13y agoAren'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 about languages (think about the meaning of that word), why not instead dissect what we do with them: programs, and find ways to improve them ?
- Peaker 13y ago> 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.
- NKCSS 13y agoI don't get the "Fobjects are unusable for type systems since an object does not carry any type information." You can just do if(myObjectToTest instanceof typeOfObjectIExpect)
- jashkenas 13y agoDespite most of the points in this post being debatable — there's one bit that caught my eye: "Being nice will not help it, and CoffeeScript is not radical enough." As the guy who started CoffeeScript, I agree. It's an intentionally very conservative approach. But there's more than one good way to skin the JavaScript cat. I think it would be fun to take another run at the same problem — attempt to find a minimal, readable, and easier-to-learn language that fits in the same role as JavaScript — but to do so with a much more radical design. Whereas previously such a thing would have been unusable in practice, having good sourcemap support in most browsers these days makes it viable, perhaps. I've been playing around with it a bit...
- bayesianhorse 13y agoKeep 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.
- ChrisAntaki 13y agoTypeScript & Dart are offering optional typing. ASM.js is seeing big performance gains through utilizing the numeric types, and avoiding the GC monster.
- jashkenas 13y ago> 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.
- bayesianhorse 13y agoExactly.
- erokar 13y agoVery intriguing. I hope you pursue this, if anyone I think you're the right man for the job.
- rdtsc 13y agoSadly I agree, you can just start with this: > [1,10,5,-15,-2,4].sort(); [-15,-2,1,10,4,5] And yes saying "oh but it is because it has weak types" doesn't excuse it, it is broken and that's that. Naming the brokeness with a label or showing why historically it is there, doesn't fix it. On the other hand they do have nice closure support, I do like some of that. But in large, the language makes me angry every time I have to use it. Someone mentioned Dart, I am hopeful for that. But who knows how long till dartvm is embedded in Chrome. For now dart.js and source maps might help. There is a bit more palatable Coffeescript. But it only puts some band-aids over JS's brokenness. Also agree with callback hell. It is funny people extol is at the next big thing -- whoo, asynchronous calls! You can callback in your callback while you callback. No, no, no. That is a horrible way to handle large concurrency problems! (Good for quick one page examples though!). Async and friends help. But why the heck do I need to stick a callback in the middle of my logic if all I need to do is make a request to the database or another GET request? The only sane way I know how to best handle concurrency is using a language with support of goroutines/isolates/tasks or even threads and queues. Even deferreds are just sugar on top of callbacks. We all know how Python's Twisted has taken over the world, right? Oh wait, it hasn't. Calling them Futures or Tulips or whatever doesn't fix the underlying problem. > I can understand that some people wanted to escape the MRI infrastructure by going Node, because - you know - learning Japanese is hard. Granted node is fast. (And according to its author scales linearly across CPU cores, sorry couldn't resist the mandatory jab at that). Ok it doesn't really scale across cores and it will block everything if you do a for loop in the middle of your logic. But it is really fast, amazingly so. And that is like crack. It gets people hooked. EDIT: JS has weak types not just dynamic, one can have dynamic and strong types for example, like Python ( https://en.wikipedia.org/wiki/Weak_typing https://en.wikipedia.org/wiki/Weak_typing ). Thanks makslinn.
- masklinn 13y ago> And yes saying "oh but it is because it has dynamic types" doesn't excuse it It has nothing to do with dynamic types[0]. It has to do with > If compareFunction is not supplied, elements are sorted by converting them to strings and comparing strings in lexicographic[0] period end of the story. You might argue it's a shitty default, but please argue against reality, not what you (wrongly) believe it is. [0] this is the MDN translation, the exact specification is steps 14 to 18 of the SortCompare abstract operation, defined in ECMA-262 5.1 15.4.4.11 "Array.prototype.sort (comparefn)": 13. If the argument comparefn is not undefined, then a. If IsCallable(comparefn) is false, throw a TypeError exception. b. Return the result of calling the [[Call]] internal method of comparefn passing undefined as the this value and with arguments x and y. 14. Let xString be ToString(x). 15. Let yString be ToString(y). 16. If xString < yString, return -1. 17. If xString > yString, return 1. 18. Return +0. [0] your edition to "weak types" is just as wrong as the previous version I quoted was.
- chrischen 13y agoI've been meaning to pick up Dart for a new app, but there aren't any great frameworks for Dart apps yet. It seems Angular is being ported though.
- spankalee 13y agoDart doesn't really need "frameworks" in the way that JavaScript does. The core libraries are very rich: * dart:async give you Futures (Promises in JS, no need for Q) and Streams * dart:core and dart:collections give you real data structures like List, Map, Set, Queue, LinkedList, LinkedHashMap, etc. Much more comprehensive than underscore.js * dart:html is much improved over JS's DOM, and have most of jQuery's functionality (see ElementList). * New and upcoming standards like Shadow DOM, custom elements and template binding let you declaratively define your HTML template in HTML with data-binding, which is the foundation of frameworks like Ember, Angular, Knockout, etc. * Polymer is a JS and Dart library for helping you write custom elements. Also, the package system in Dart, pub, is very similar to npm and encourages smaller, focused packages rather than sprawling frameworks. Check it out, it's a very nice language and environment. But I'm on the Dart team, so I'm obviously biased.
- z92 13y ago"JS has callable attributes, Hobjects are unusable for stable keys...object does not carry any type information, Null everywhere, since ojects are hashes" I find most of the problems listed are related with dynamic type system of JS. These all can be solved most easily by a statically typed language. Therefore the debate mostly is between static vs dynamic typing.
- nness 13y agoI would also argue that expecting an object to carry type information is an unfair expectation of a non-object-orientated language.
- gnaritas 13y agoJavaScript is an objected oriented language.
- Fr0styMatt 13y agoNot really, from what I gather it's closer to a functional language that lets you implement objects with private data by using closures.
- gnaritas 13y agoYes really. It's an OO language based on Self's prototypical OO model rather than a class based OO model. Prototypical OO is still OO, unless you're claiming Self isn't OO, but the Smalltalker's who invented Self would very much disagree. Prototypes are objects, no closures or classes required.
- Fr0styMatt 13y agoAh, I stand corrected, thanks. Makes sense; I think I had something about private vars in JavaScript and closures running through my head and confused it with 'JavaScript does OO with closures' :)
- esamek 13y agoFor modern development of what? Then don't use Javascript. I'm not sure I can really appreciate another rant about how one language, framework, pre–compiler, VM, etc is terrible and everyone should stop using it. Javascript's popularity has emerged organically. Its not because it has the best design. Its because it can get the job done and is browser based–and now server-side too. The browser is the next OS, the ultimate VM, if you will. If you just stop picking at it and appreciate it for what it is...it is f'ing awesome.
- nbevans 13y agoIt's operating a defacto monopoly on a layer of the modern development stack. This does not make it "f'ing awesome". People rant about JS not because it's shit, per se. Everybody knows that. They rant because they long for better languages that are available across all web browsers. I would like to see a standardised CLR-style VM that allows language modules to be loaded as requested by a particular web page. Otherwise we'll just be replacing JS with what will probably be another old fashioned imperative language (see: Rust). We don't want that. We want freedom to use whatever language we want.
- camus2 13y ago> Then don't use Javascript Like people have the choice. "Dont like HTML ? so dont write it" sounds stupid doesnt it.
- jbverschoor 13y agoyay ruby!
- gexla 13y agoIt's interesting to see so many people say "JS is great and we used it to build X" on one side and people who hate JS on the other side. Obviously Node (and JS) has some things that it is strong in. People use it to build those things. Good developers won't use a tool in their box which is inferior to another tool they can use effectively. In between, there is a lot of room for "good enough" where tools overlap. I think some developers are able to largely stick with a certain tool because development goes in waves. I can spend multiple months on a certain profile of work and then get hit with the same type of project a couple more times. Maybe by then I become an expert with that thing and I just keep doing those sorts of projects. You might think I'm crazy because I'm a "Node developer" but you probably don't know the nature of the work that I do. Eventually I get hit with a different project and everything falls apart if I try to keep using the same tools as I had been using. So, I curse myself for being stupid and wasting time and start over with the tool I should have been using in the first place. Some developers might have such a limited set of tools that they can't (or won't even try) to switch. "So, I landed a big gig for the government. It's a healthcare site. I'm going to build it in Wordpress." Following this thread further, look at some of the selling points of Node. * It's great because as a front-end developer, you probably already know JS. With Node you can use JS on the back-end also! * Because the front-end and the back-end are both in JS, I can use one programming language and re-use libraries for each side. Great, let's encourage people who only know one programming language and a limited range of tools to just stay in that box. There are things that X tool does well. There are things that X tool is horrible at. Perhaps rather than ragging on Node, the author should write an article explaining that developers should be expanding their tool-set so they have flexibility in handling different types of problems.
- solomatov 13y ago>Obviously Node (and JS) has some things that it is strong in. People use it to build those things. Good developers won't use a tool in their box which is inferior to another tool they can use effectively. In between, there is a lot of room for "good enough" where tools overlap. People use JavaScript not because it's good but because it's the only option to develop in a browser. Having the same language on the client and the server is a very strong point, that's why they use NodeJS.
- prottmann 13y agoYes, JavaScript is terrible. But JavaScript is not the end of programming languages, it is a step for the next big language. I think everybody agree that different languages for frontend / backend development are the not the best solution, so JavaScript is a big step forward. But i think soon it is necessary for a complete rebuild for a new language, with all the things included that we learned and invented from the "old" languages. Dart, TypeScript, Coffescript, and the 1.000 other language Modifications / frameworks try all to fix a little part of the problem. Thats nice but annoying too.
- qwerta 13y agoAs someone who maintains old 1000+ KLOC projects I have to agree. Have look at some large old Perl projects to see how JS code will look&feel in 10 years. But on other side I see JS bytecode as great alternative to Java and JVM. Modern languages usually include JS as compilation back-end.
- fridek 13y agoGoogle Closure Compiler + @struct = new property definition outside of constructor is forbidden. Or DEBUG_ON && Object.seal(this); at the end of every constructor. Here, I've fixed "Hobjects" for you. JavaScript allows you to write shitty code, but whether you do it or not is just a matter of skills and tools.
- masklinn 13y ago> They are not solvable by making a new ECMA spec. As it turns out, many of the issues outlined are not only very much solvable by making a new ECMA spec but either already solved in ES5 or solved in ES6. > JS has callable attributes > This is a shitty design decision I strongly recommend not following the provided link, which is basically inane, uses the term "slots" in a rather disturbing manner and makes completely incorrect assertions e.g. > Self [is] slot-based. This gives one substantial advantage: not having to specify that you want to move a block of code as a value explicitly. So you can do, for example in JS // boom! we transplanted a method someVar.smartMethod = another.otherMethod; to my knowledge, you most definitely can not do that in such a manner in Self. Slots manipulation in Self can only be done through primitive messages (e.g. `_AddSlots:`, which takes an object whose slots should be copied into the receiver). > Hobjects are unusable for stable keys > The mixup between objects and hashes is also a very bad idea, because it defies the premise that objects can have metadata on them - which alllow you to establish a rudimentary type system or at least any kind of introspection. Magnificent baseless assertions. Javascript allows for object metadata through the prototype, or through properties (Object.defineProperty/Object.defineProperties) which — amongst others — allow setting non-enumerable properties. ES6 also introduces the concept of names. I'm not saying maps-as-objects is great, but I am saying these assertions are 1. wrong and 2. nonsensical. > Fobjects are unusable for type systems since an object does not carry any type information. > This one is a biggie. Even in the Ruby world, where everything is happily quacking like a duck, we often use the Object#class to get information about an object. In ES5, the exact same behavior is provided by Object.getPrototypeOf providing access to the internal [[Prototype]]. Most implementations also provide direct access via the __proto__ property, which IIRC ES6 standardizes. And of course the `instanceof` operator has been there since ES3, but that's only ~13 years ago. > Nothing will happen. Since ojects are hashes[...], our constant with the wrong key will be undefined, and will happily bleed into the callee. This makes stack traces huge. 'Nothing will happen' (and the related "What is the error that you will get if MyApp.Views.WidgetView is not defined yet? undefined is not a function of course! [...] And why? Simply because everything is a hash and the language is incapable of doing any kind of introspection." later) and 'objects are hashes' have nothing to do with one another. Hashmaps does not actually require unmapped keys to return nil or undefined. Javascript does because it is shit. Same for Ruby or Java. Python does not have that issue, accessing an empty key will raise a KeyError. > and the language provides zero facilities for constants All runtimes but MSIE (unless they've added it in IE11) already implement `const`, and it's standardized in ES6. > Callback hell > [...] In a normal situation this would have been fixed simply by adding a wait primitive to the language which would schedule the events when the result is still being fetched. You mean, something like ES6's yield? > Terrible exception handling No objection there, javascript may well have a worse exception handling than Go, a language whose users try very hard to make others believe doesn't have exceptions in the first place. At least runtimes are finally trying to generate callbacks worth reading. Not that this help when mixing with async, as your final traceback will lack 90% of the necessary context.
- telephonetemp 13y agoThe webpage is difficult to view in the Android Browser (though not Opera Mini) due to the overlay at the bottom. http://m.imgur.com/9eOKqJZ http://m.imgur.com/9eOKqJZ On that note, at what resolution, if any, do embedded code snippets from GitHub and the like stop getting get cut off on the mobile? At 800x480 they get cut off even in landscape mode.
- pmelendez 13y agoThe same happened on a windows phone
- seivan 13y agoCoffee Script makes it a bit sweeter.
- jamescun 13y agoI don't understand how the author thinks simply calling every little annoyance "shit", without further explanation, is very constructive.
- codeboost 13y agoHere 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.
- forgottenpass 13y agoTurns 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.
- talmand 13y agoAll 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.
- rollo 13y agoBecause concepts from the bleeding edge of language research are slowly trickling down from Haskell & Co. to mainstream languages. Ten years after they emerge.
- annnnd 13y agoI 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. Python, JS and PHP are dynamic, Java is a great language but crappy concept (don't tell me it isn't slooo... <wait for GC... ok, done> ...ow). Ironically, the ugliest language I have ever coded in (ObjectiveC) has the best design decisions (IMHO). ARC instead of manual memory management or GC, strongly typed but still allows generic object pointer (id),...
- Skinney 13y agoThe reason alot of people like dynamicly typed languages is that they don't have to babysit the compiler. Small example, in JS, if you have a function that works on a "age" property of an object, it doesn't matter what kind of object you send in, as long as it has an "age" property. You can do this easily in staticly typed languages as well, but you have to write more code (generics, class/struct-definitions, interfaces ...). > I mean, if I have a variable I ALWAYS know what kind of data I expect in it Really? Why did people invent generics/templates, interfaces and class-inheritance then? You won't always know what type you are receiving, and alot of the time you don't really care either, as long as it meets your criteria. > The problem is that you hardly have a choice nowadays Course you do: C/C++, Haskell, OCaml, Go, Nimrod... Soon you'll have Rust to play with as well. > <wait for GC... ok, done> Depends on your usecase. As long as your active memory use don't number in multiple GBs, GC is quite fast. I have an application spawning 1GB of garbage a second, this takes 5ms (a second) to collect. Not bad IMHO. The work they are doing on the new G1 collector also seems promising. Btw, GC can in many cases have lower overhead than ARC (Python also does ARC btw). > strongly typed but still allows generic object pointer (id) Last I checked, most of Obj-C prefers dynamic typing. NSArray and NSDictionary for instance, can contain any type. Regarding (id), most languages allows this. "Object" in Java/C#, void* in C/C++, interace{} in Go etc. In the end, it doesn't really matter what language you use, as long as it gets the job done. If your language isn't available, you're mostly able to use another language anyway. Almost every language nowadays has a JS-compiler. There exists a Java Bytecode -> Native code compiler, same with C#.
- potch 13y agoThis article reads like this comic: http://imgs.xkcd.com/comics/rock_band.png http://imgs.xkcd.com/comics/rock_band.png goes back to happily writing JavaScript
- pkorzeniewski 13y agoI'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 create all the amazing stuff and all of this results in one of the most important things - development speed. Sure, JS has a lot of quirks you need to be aware of and it's easy to write bad JS, but with some experience, you can rapidly write a maintainable, easy to read, flexible and modular code.
- marrs 13y agoYeah, 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.
- CmonDev 13y ago"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!
- curveship 13y ago> a function is not an object, not a datastructure that can carry data Wait, what? That's the definition of a closure. Most of this seems to boil down to the author saying "my programming brain was hardwired by Ruby, and I'm annoyed JavaScript is different." OK, I feel your frustration. As a reader, though, I'd far rather see a post from someone who has spent the time to become proficient in both ecosystems and can offer more considered pro/cons. On one point, I'll agree: I wish Javascript had an easy way to say "referencing an undefined property of this object should throw an error."
- ksec 13y agoWhile I agree JS is a shitty language overall, and worst when writer larger apps. Having someone who wrote this on a website that spend 30% of the screen estate for page footer isn't very convincing.
- zimbatm 13y agoLooks like learning rage. When faced with a new thing to learn, point out all the mistakes and flaws that give you reasons to not learn this shitty thing in the first place. Or it could be the 3rd stage of grief :)
- orr94 13y ago> In a normal situation this would have been fixed simply by adding a wait primitive to the language which would schedule the events when the result is still being fetched... 80 percent of the programming is about doing one motherfucking thing with another motherfucking thing and you need both of them to complete the action. I love JavaScript, but I totally agree with this.
- louischatriot 13y agoAnother rant by a programmer who clearly doesn't understand JS... It does have its drawbacks (what language doens't?) but if you have some coding discipline you can code pretty big application without headbanging.
- gubatron 13y agono threads... (WebWorkers to the rescue, still no threads) counterintuitive variable scoping (poor new programmers that keep plaguing the web with bug after bug and shitty global riden code, until they eventually understand enclosures and functional scope), just so shitty. can't really use all the language because it's broken in different places depending on the runtime (see "JavaScript the good parts" to learn the safe subset), it's like walking through a landmine coding in javascript, too many "don't's" a=[]; //length is zero. a[0]=1; //length is one. a[23]=2; //length is two. a.length //ask javascript for the length? outputs 24. SHITTY "LANGUAGE" This is a language that has been stretched thin for a lot of things it wasn't meant to do. Can we has script type="text/python", or script type="text/ruby", have some decent languages running on everybrowser once and for all, can't believe we're trying to rebuild everything that's already been matured in so many really powerful languages in this messy language. The fact that there are so many, so many frameworks for doing the same things, or that nobody knows for sure how to organize large amounts of code in a standard way show how weak this thing is. can't wait for the javascript madness to end. in the meantime, until we don't decide to hack Chrome, and Firefox to include a virtual machine that can run the language of your choice we're stuck with this piece of shit.
- ilaksh 13y agoWell, this will probably just be ignored or downvoted, but as far as I can tell, ToffeeScript (a derivative of CoffeeScript which is a derivative of JavaScript) is the best language to be programming in today. Of course "best" is subjective, but I believe that the combination of Node.js's superior module system and the available packages, the clarity of the language (which actually surpasses Python) combined with the asynchronous single-threaded event-based model, and ToffeeScript syntax which makes asynchronous code read like synchronous code, makes this a superior platform. I do think that Go is a wonderful evolution of C, but the module system or at least ecosystem is inferior to Node's, and the language syntax and concurrency approach (although very useful and better than Node's in many circumstances) is old-fashioned. Many people don't trust, don't learn, and ultimately cannot objectively evaluate JavaScript, simply because it is too easy to use. [sarcasm] And everyone knows that real programmers don't use easy languages. Those are for beginners.[/sarcasm] That's the real explanation for most of the JS hate. The other part of it is the people who did try to learn it, found out there were problems, and then for whatever illogical reason decided that they couldn't use CoffeeScript or any other similar language to compensate for those problems.
- camus2 13y ago- Unfortunatly you can complain all you want you'll have to write some javascript if you do front-end development. And today there are quite a lot of tools (transpilers,linters,etc...) that can help you with that. Fortunalty you can chose the language you want on the server.
- headgasket 13y agoYou are holding it wrong. No seriously, you might be trying to use a fast glue/prototyping/event processing and browser deployed language to do something that should be done in a different environment. If your core logic task is algorithmic, consider C or Go and call that from your event framework. If it's data integrity/type-safety related, consider using your sql dialect. (not a flamebait, but nosql is just a big distraction, please seriously consider postgres, it rocks, esp with json and plpgsql stored procedures that can be used to enforce data integrity braces and as independent unit testing for your data structures) AngularJS, Express, node, and postgres is the most potent combination I've used in a long time. Cheers,and good luck! F
- timruffles 13y agoI thought I'd write up a response to this, pointing out how Javascripters get around these issues right now, and how they will come ES6: http://sidekicksrc.com/post/for-modern-development-javascript-is-just-something-you-need-to-learn/ http://sidekicksrc.com/post/for-modern-development-javascrip...
- chrismorgan 13y agoIs it impossible to write an article like this without liberal use of swearing? Many of the points in the article are quite reasonable, but with the foul language used in it I cannot bring myself to read it all. Foul English is far, far worse in my eyes at least than JavaScript.
- goshx 13y agoEvery time I read an article of someone blaming a language, that is not the language they love, I feel like I am reading an airplane pilot, driving a bus and screaming: BUT THIS THING DOESN'T FLY!!!
- gesman 13y agoAgree. JS = gavno. It's faster than Ruby only because Ruby is slow like gavno as well. The fact that many are eating gavno and are feeling happy about it does not make it healthy or tasty. The problem is when there are no other food to choose (browsers). That's why I love backend development. I can choose a decent, compiled, strongly typed language and well-supported framework.