27
moqs
4y

Seriously? Javascript is the best?Javascript is the future?

Dont get me wrong. I have to use angularjs and nodejs in my work so I am quiet familiar with them. Js csn be usefull and make things easier and simpler but it comes with a price... You can do someting in third amount of effort but you have to debug three times more. Yes you can use typescript but thats not an option always. What about single threaded design yes you can use callback and promises but really? Thats the way it is should be working? And what about that if you need one functionality than you dowbload a module but with that you are started to depend from other 737373737 packages.

I am just simply not getting this hype around JS.

Comments
  • 7
    With js its feels like jumping from a plane with a parachute that might work. But with java or csharp its like controlling a drone from a totaly secure place in a bunker.. You know that feeling?
  • 3
    @Letmecode i very much like js, and i kinda like angular and yet still i agree. Angular can and will making use of proper js techniques really hard sometimes.

    While the critique is certainly valid, there are things that seem a bit arbitrary to me, namely abusing modules, I don't and still i manage to do my work.
    No argument that npm in some aspects is a mess, but introducing that mess into codebase is each programmer own responsibility.

    Last thing, I wouldn't make any highly concurrent app in js as i dont think it would be right tool for the job.

    About debugging - coming from C i very much miss my types, but other than that I don't see a problem.
    JS had complicated origin, but its very flexible and expressive which inherently has to allow shooting oneself in the foot.
  • 9
    I think pure Js is useful for what it's supposed to do. But babel,jsx and all the other transpiler crap has to stop. Devs are simply too stupid to understand the purpose of a dynamic language and basically built a strict language ontop of Js.

    So what you see today is not really Javascript anymore.

    And to make things worse, more people jump onto the bloated hypetrain, people who were probably better off coding what ever language they were using back in 2013.

    I'm gonna hide with Ruby until this shitstorm blows over and enterprises fall apart due to their personell having a mental breakdown.
    Developer happiness is replaced with hype-driven-development.. 'nuff said
  • 2
    @fuckinghipsters I disagree, JS transpilers are good.

    Babel allows you to run ES6 in browsers and also convert it to ES5.

    Typescript allows for static type checking, I dont understand how that is bad..

    Many other transpilers exist, and many are actually very good, and I see no point in hating its existence.

    What is wrong is that JS is clearly lacking and hence their is a requirment of these transpilers.

    The problem is with JS, not the transpilers.
  • 5
    @fuckinghipsters not a fan of js, but have to disagree with your comments on transpilers. The "real javascript" as you put it, lacked in many aspects, from functional to oo features and having those syntax available in es5,6,7 is something that was missing. This is similar to how c++ has evolved with new syntax and concepts.

    babel provides the es standards, for backward compatibility. So this means btowsers in the future will implement these features so there wont be a need for babel.
  • 0
    Btw, I think the hype around js is dead.

    Dont quite see where this hype that people talk about is?
  • 1
    @rusty-hacker i dont think that lack of oo features is bad, since js neither is nor ever was oo language.
    That there is plenty of oo raised devs trying to do things in oo paradigm in js doesn't change that fact
  • 0
    And about node being single threaded,
    you can always fork child processes
  • 1
    @Arlekin mate, you are not forced to use oo style, I dont. Js being the largest uniform platform which runs on browsers should accomodate for different styles and tastes. I personally prefer to use functional style rather than procedural or oo. I prefer creating immutale values, map, filter and reducing them. I like currying functions and creating partials. If the syntax of a language aimed at such a massive audiance doesnt allow devs to write in their preferred style, they create transpilers to match their taste. When the architects and designers of a language see there is a growing number of devs who would prefere to use feature x/y/z, they add it to the languge to accomodate their end users needs, here being devs. So if you are fine with how js is, dont use those features. If I dont like c++ meta programming, I wont use it. But its useful to many others who need it and are using it widely.
  • 0
    @rusty-hacker well I don't use them, exactly for that reason :) but that's beyond the point.
    I was just referring to your earlier comment, when you mentioned lack of oo features as a disadvantage.
    Though i agree that given its position it would be nice if js accommodated many paradigms i think it could potentially be very disruptive, and not in a good way, to have functionality catering to all desires.
    For instance putting "class" keyword on object and pretending that "there is oo in js" is awful, and imho will further confuse js newbies.

    I cannot forgive angular for embracing that awful syntax sugar...
  • 1
    Well, there's Emscripten, which turns c++ into ASM JavaScript (highly optimized). Just have to port your Java/c# to c++. 😁
  • 1
    The package management situation is pretty insane. But I think for the most part, it's because people just wanted to learn by building it themselves, not because they thought they could do it better. I've gone back and removed a lot of my packages from npm because I learned the thing I was trying to do, found someone who did it better, and no one was depending on my stupid little module.

    The other reason that node has gotten a lot of hype as it pertains to concurrency is because it's different. Most other languages rely on multiple threads for reliable concurrency, which equates to vertically scaling your servers (upgrading hardware). This can become very costly and there are usually limits. With node, however, it does its "threads" using an event loop. I would highly recommend you research what the event loop is, even if you don't care for JavaScript. So with node, you scale horizontally, a bunch of really cheap boxes without much limitation. Granted, node isn't good for everything.
  • 2
    @harambae @rusty-hacker I hold fast. Transpilers are extremely evil.
    It costs performance, check es6 speed benchmarks, 4x - 24x slowdown bablefish under optimal conditions.

    An extra unnecessary layer of complexity? 👍

    Also the transpilers screws up your debugger, when you hit a breakpoint you're no longer debugging the code that you wrote but instead debug the code that was generated , source maps are a sad replacement for high-level repl inspection.

    Don't get me started at type checking... Doing typechecking in an untyped language is just plain stupid. Writing more characters motivated by the fear that one of them is "wrong" only gives you more characters that are potentially wrong.

    Dynamic languages give us the ability to work with powerful high-level debuggers, use them!

    The problem isn't that JS is somehow flawed and needs correction.

    The problem is that the wrong people choose the wrong tool to solve a problem that doesn't exist.
  • 1
    As someone still fairly new to programming and scripting: JavaScript is fine if you need to script a bit of fancy UI, but starts to grind my gears as soon as it's used for application logic (chrome extensions anyone?) or, even worse, backend. Wouldn't it be easier and more reliable to use Java for those kind of things?
  • 1
    @fuckinghipsters well I have not faced any performance issues yet, being 24 times slower even on slow mobile devices - then again I wont implement a neural network with it. Have also had no problem debuging the source code using chrome, have not had to deal with this extra layer of complexity which you talk about personally because so far, source maps have worked for me.
    Use types as part of documentation for myself, instead of writing a comment saying what arguements a function takes, look at the type (referring to typescript and flow).

    As I said before, different people have different taste, just because you think there is not any problem, it does not mean others think similar to you. If that was the case, there probably would not have been any languages after c.

    Also regarding the wrong tool, js is the only tool available on browsers. So not quite sure what you are on about picking the wrong tool for the job ...
  • 1
    @rusty-hacker I think @fuckinghipsters is just saying that slapping static types onto js defeats the beauty of js and that dynamic typing isn't a problem that needed to be solved.

    I tend to agree. I've been using typescript lately and only declare types when it helps self-document or helps with intellisense. Otherwise you're taking the flexibility out of a language that's designed to be flexible.
  • 1
    @spongessuck
    Elegant explanation 👍

    @rusty-hacker
    If you're a junior with no prior knowledge to es5 or how transpilers work then you're going to have alot of problems with debugging and understanding which layer you're working in. Have you seen the "getting started with js" material that Google recommends lately? We're not doing our next generations any favors with slapping on awesomesauce typechecking onto JS because it's cool.

    Also JavaScript is not the only tool because you have preprocessors. You write a completely different language, but still people call it JavaScript. And publish packages to NPM that are completely unusable without webpack or browserify and what not.

    It makes as much sense to push Java jarfiles to npm with a crafted run command that works only if you have Java installed on your system.
  • 1
    @fuckinghipsters you are completely right. We should stop any further development, because it makes it incridebly harder to learn.
  • 2
    @fuckinghipsters 👏👏👏👏👏
    I hate when i have to setup and replicate someone's build process just to use a thing
  • 1
    @rusty-hacker actually that's exactly what's bugging me. All the backwards thinking dinosaurs who refuse to learn a language and label it broken because they cannot define types and "class" wasn't a keyword.

    Congrats we've mastered devolution and invented a way to once again enjoy the Java/XML/xslt era. #historyisrepeatingitself
  • 0
    @fuckinghipsters but you have ignored a lot useful features which have been standardized and only focused on classes. Ignoring the const, let, arrow syntax, spread and rest operator, modules, destructing assignments, ...

    None of these have anything to do with classes and they are actually very useful. Allowing me to write less code with more elegant syntax.
  • 0
    @rusty-hacker again you're missing my point. The features you're talking about aren't yet implemented. You're using fake standards at the cost of preprocessed code and a bloated dev-environment.

    But if you want to talk classes then you should know that the so called classes you're using with babel are nothing more but an obfuscated function with a bound "this" value. Ergo you're not using classes.

    And if you'd learn to write dynamic code in an elegant fashion, you'd realize that OOP is redundantly verbose, forcing you to write more code for less functionality.

    The people who jumped onto the Js wagon from .Net and other various toy languages are just surprisingly bad at writing code.
  • 1
    @lionliam96 thanks for proving my point. That is not a language flaw, the "problem" you illustrate is caused by bad application architecture and bad application code. static typing is not the answer, terminating useless developers is.
  • 0
    @fuckinghipsters you keep focusing on the class keyword while ignoring everything else. Classes are one way of doing oo, while prototype based is another way. I personaly dont care for neither and am glad that a lot of the other useful features are available.

    Also I like dynamic languages, js isnt the only one. In a lot of those other dynamic languages, they through a runtime error when attempting to perform unintended certain operations. More importantly they are consistent, rather than following an extemely odd sets of rules. Try the + operator with {} or [].

    I think most of the "fake" standards, have made js more expressive than it was. Hopefully in the near future, there wont be a need for complcated build setup as they'll be implemented (as a lot of them are already, ref developer.mozilla.org)
  • 0
    @lionliam96 Chill out, man, I think we all know where you stand on JavaScript.
Add Comment