13

god i despise these "javascript is bad" articles. everyone seems to be jumping onto that train ever since the WAT talk.

javascript is a *weakly* typed language with implicit type conversions, that's why `{} + []` gives you `0`.

it is not easy to be the most widely used language, and to maintain compatibility across varying platforms.

please think twice before dismissing hard work.

/rant

Comments
  • 14
    JS is popular because of historical reasons, it does have quite a few language design warts and it's fair to call it out for that. It was designed in a hurry and to meet a specific demand at a particular time, and then just grew through accretion.

    Besides, someone can be critical of JS while being good at it and able to do useful work.
  • 5
    @RememberMe

    Fair enough. I certainly cannot dismiss all criticism.

    But I do have a grudge against people that point out js type coercion with their noses held high :^)
  • 6
    @NerdyPepper Weak typing *is* bad, though. Seriously bad
  • 3
    I completely agree with you. Most people that know the language on a deeper level find it to be really expressive(myself included) and we know the warts and quirks as well as how to go around it.

    The sad part is the bandwagon mentality that developers have.

    "This cretin that uses my stack says that thaaat other stack is shit. Therefore that stack is shit"<---and the continue the circle of limitless sheepability.

    I have dislikes, but recognize that they come from my own personal bias and I am willing to change my mind upon being proven wrong. Most devs are not like that and would rather stick to their own biased opinions.

    This is also my biggest fucking complaint about this community.

    Either way, glad to have you here man, not many new people come in with commonsense.

    Btw @RememberMe is one of the good ones. The man posts some really interesting pieces of knowledge and is definitely not biased :D

    Welcome to dev rant!
  • 3
    Typescript + Hot reload = bliss.
  • 3
    @AleCx04
    True. Devs are a stubborn lot.

    Thank you for the kind words.im looking forward to spending some quality time on here :')
  • 1
    @bartmr hell yeah I love me some typescript
  • 2
    @Owenvii same man. TypeScript is really fucking good. Just goes to show how expandable JS as a language is to accommodate all these different programming styles.
  • 2
    I don't hate JS. I don't like it. Just because something is not easy it does not mean that I have to like the necessary compromises.
    Also JS has a bit of a problem in the fact that its existence enables the different platforms in diverging.
    Its great flexibility means that people are pushing against its limits sometimes. And there be (logic's) monsters.

    Anyway just like any other language it is just a tool. I don't like it much but it is not that important in the end.
  • 5
    @halfflat Strong typing is for people who build robust software
  • 1
    @Pickman and that is fine. Not liking something is completely 100% fine.
    What sucks is shitposting about it being shit all over the place as if it were a fact instead of merely a biased opinion
  • 2
    Every language / framework / library is shit.
    Every language / framework / library is great.
    Every language / framework / library has its pitfalls and wonky parts.

    This is why we have so many of them.

    But use them in the right space, and use them well, and you'll derive you're own opinions.
  • 0
    alert(("11"+1)-1);
  • 0
  • 1
  • 0
    I like JavaScript. And the weak types are one reason. With JavaScript you can do things that are impossible with strongly typed languages. Yes, it is a dangerous area, but if you are good enough to handle it properly, then JS is a blessing.
    By the way we use JS not in a pure form but as TypeScript. But despite the fact that TS adds a strongly typed system, it is just JavaScript in the background and with a bit deeper knowledge of TS you have a powerful language that is more powerful then many other languages.
  • 0
    @irene Sure, many things JavaScript can, are also possible in other languages. But there are also many things that are very hard or just impossible in hard typed languages.
  • 0
    @AleCx04 well, we are on devrant. When people rant they're rarely objective.
  • 0
    @irene everything you cannot do with strong types 😉
  • 0
    @irene I believe he is referencing the concept of things that we can do with syntax, rather than type of applications we can build.
    For example the difference between:

    @highlight
    bunchOfThangs = ["A String", 123, {"uno" :dos"}]

    vs

    @highlight
    String[] onlyStrings = {"These are", " only ", " strings" };

    I could think of a couple of reasons as to why one would want mixed types inside of his arrays, i can also think of a couple of reasons why we would like to limitate the types that we want inside of an array, something that I have only seen in TypeScript which is Javascript:

    @highlight
    let numbersAndStrings : [number, string] = [1, "Example"];

    Powerful little language
  • 0
    @AleCx04 `Object[] bunchOfThangs = {"test", 42, new Object()}` Also works in Java. Doesn't mean that you should use it or that it's a positive in the first place, quite the opposite
  • 0
  • 0
    I'm also struggling with parsing an indeterminable json structure into Scala as the libraries can't serialize/deserialize an "Any" object. Javascript would be able to do it pretty easily.

    I know that JSON was designed for javascript but it's a standard data structure that every language should be able to handle and does have equivalent data structures. It should be as hard as it is.
  • 0
    @halfflat That's what I thought. The issue is that they can be so many datatypes that in OOP, are in many different packages so the common class tends to be the top level Any/Object class. Unfortunately this doesn't just cover all types that JSON supports so could potentially be any class according to the libraries. It can't determine what it should be, therefore how to serialize.

    You can use case classes to define a structure that boils down to primitive types but I can't use that in my use case.
  • 1
    say what you want about js but i ain't using anything else to fuck with the DOM i tell you hwat
  • 1
    @shabbysoft exactly! And there are some projects out there that attempt to map other languages into it, it is uncomfortable as hell. The only language that I feel would be naturally good at it is Lua and that is only because it also works through prototypes
  • 0
    @irene python has prototype base objects? Can you give me an example?0.o
  • 0
    Well, JavaScript IS BAD. Very very bad. You can’t even trust a local variable name….
    No one should do plai JS in 2019. Noone !
  • 1
    @NoToJavaScript i do and have 0 issues with it :D
  • 0
    @irene that wouldn't be the same but i get what you mean
  • 0
    @irene i fail to see where I said that it was better. Are you trying to make imaginary arguments here? Or trying to make me change some perspective of Js that I have? Cuz that shit ain't happening:P nor do i need to change your mind, you are not a web developer man, i don't even know why you are throwing your 2 cents on stuff that you don't even use o.o
  • 0
    @irene that is fine too :D
  • 0
    @irene it is not equal. You are right. I just find it hard to care so much about the quirks of a tool you cannot use.
    It equates to me talking shit about CAT machinery when I don't use it or work with it. You asked a dude what he meant, i tried giving example of what i thought he meant, somehow you took it as "zomg js lovers ganging up on me". I like the language because I can work through its quirks to make shit that can pay me fuckloads of money. Sitting down crying about it not being standard class structured oop or having a poor type system is better when you "wipe the tears" with money.

    If you love types so much and have to use js maybe try purescript or Typescript, in in one you get type purity. In the other proper class structure.
  • 0
    @irene err, no i did not. That was not a debate point for you, it was an agreement with other user regarding preferences over manipulating the DOM and which languages would fit the bill. Out of the examples that I mentioned you where the one that jumped the boat with stating that Python has prototypes :P which it does not btw. I was open to the idea, shit if Python added Prototype Based Objects I would have dug it. Your constant state of passive aggressiveness puts you in this place when you think either people agree with you or have debates with you man. You need to chill fr.
Add Comment