Skip to content
DevMeme
3927 of 7435
TypeScript Makes JavaScript Grow Up
Languages Post #4274, on Mar 16, 2022 in TG

TypeScript Makes JavaScript Grow Up

Why is this Languages meme funny?

Level 1: Training Wheels

This is like a kid asking if they can ride a bike however they want, and the parent says, "You need a helmet and rules now." The kid misses the old freedom, but the rules are there because bigger rides create bigger crashes. TypeScript is JavaScript with extra safety labels, and the meme is funny because developers both complain about those labels and secretly rely on them.

Level 2: Static Types, Soft Landing

DynamicTyping means a variable can hold different kinds of values over time, and many JavaScript errors are discovered only when the code runs. StaticTyping means the language or tooling checks types before execution. TypeScript adds a type layer on top of JavaScript, so developers can write things like x: string to say that x should contain text.

The meme's first panel asks VAR X?, which sounds like the older JavaScript habit of declaring a variable without saying much about what it contains. The second panel answers with VAR X:STRING NOW, meaning the variable must be labeled as a string. The third panel says everyone is moving to TypeScript, which reflects a real LanguageAdoption trend in the JavaScriptEcosystem, especially in teams maintaining bigger apps.

For a junior developer, this can feel like going from sketching to filling out forms. At first, TypeScript errors may seem fussy: "why is it mad, I know this is a string." Later, the same checks start catching bugs before users do. The emotional joke lands because both feelings are true. JavaScript feels flexible and forgiving; TypeScript feels stricter, but it often saves you from future confusion during refactors, deployments, and framework upgrades.

Level 3: Type Annotations Grow Up

VAR X?

NO SON, YOU HAVE TO USE VAR X:STRING NOW

IT'S OK, EVERYONE'S MOVING TO TYPESCRIPT NOW. I MISS JS TOO

The meme turns TypeScript adoption into a childhood bereavement scene: the kid remembers the old JavaScript freedom of var x, and the adult gently explains that the industry has decided variables should arrive with paperwork. The visible VAR X:STRING is not idiomatic casing, and modern TypeScript developers would usually reach for let or const instead of var, which makes the post message You are using var with TS? a second layer of critique. The meme is mourning JavaScript, but the comments section is already opening a style-guide ticket.

The senior-developer pain here is not that StaticTyping is bad. In large Frontend and full-stack JavaScript codebases, TypeScript often prevents boring, expensive mistakes: misspelled property names, nullable values treated as real objects, API responses that silently changed shape, and refactors that only "worked" because nobody clicked the neglected settings page. The joke is about the cultural shift. JavaScript used to feel like a fast notebook: declare something, mutate it, pass it around, and find out later whether reality agreed. TypeScript changes that into a negotiation with a compiler that asks, politely but relentlessly, "what exactly do you mean by this?"

That negotiation improves CodeQuality, but it also creates new rituals. Teams argue over any, unknown, inferred types, generated API clients, strict mode, ambient declarations, and whether the type system describes the domain or merely quiets the build. A migration can start as "just add TypeScript" and turn into archaeology through every implicit assumption the JavaScript codebase ever made. The adult in the image is comforting the child because there is a real loss of immediacy, even when the trade is worth it. Dynamic code lets you move fast; statically typed code makes the bill arrive before production instead of during it.

let x: string = "hello";
x = 42; // TypeScript: no, and this time it has receipts.

Description

The meme uses a three-panel emotional movie scene of a father figure comforting a young boy outdoors. The top panel text says "VAR X?", the middle says "NO SON, YOU HAVE TO USE VAR X:STRING NOW", and the bottom says "IT'S OK, EVERYONE'S MOVING TO TYPESCRIPT NOW. I MISS JS TOO". The joke frames the migration from loose JavaScript declarations to TypeScript-style type annotations as a childhood loss. It is really about the industry's shift from dynamic scripting convenience toward static typing, type safety, and compile-time checks in large JavaScript codebases.

Comments

60
Anonymous ★ Top Pick JavaScript did not disappear; it just got a type annotation and a lifelong fear of `any`.
  1. Anonymous ★ Top Pick

    JavaScript did not disappear; it just got a type annotation and a lifelong fear of `any`.

  2. @germanmetall 4y

    let...

  3. @VladislavSmolyanoy 4y

    strong types > weak types that’s not on opinion, that’s the truth

    1. @realVitShadyTV 4y

      Strong types for virgins who don’t sure about their data flow. True chads knows what they pass and receive.

      1. @chupasaurus 4y

        https://github.com/minimaxir/big-list-of-naughty-strings

      2. @VladislavSmolyanoy 4y

        Fair enough. Your opinion is still wrong

    2. @ixplo 4y

      sure, but ts is more expensive, and has readability problems. so 1:1

      1. @VladislavSmolyanoy 4y

        What readability problems?

        1. @ixplo 4y

          random example from react-router. looks like zip-archive opened in notepad

          1. @Box_of_the_Fox 4y

            React is so fucked and broken that even ts can't help

            1. @ixplo 4y

              vue-router TS :)

  4. @saidov 4y

    "as any" for help

  5. @Box_of_the_Fox 4y

    And do not try to use ts in react-native

  6. @Box_of_the_Fox 4y

    Just don't

  7. @Box_of_the_Fox 4y

    It's absolute hell

  8. @Box_of_the_Fox 4y

    To get routing working you need to do type to type to type

  9. @Box_of_the_Fox 4y

    Like

  10. @Box_of_the_Fox 4y

    What the fuck happened there

  11. @ixplo 4y

    I think that there is only one reason why TS is so popular. Bad coders are trying to look like a good ones

    1. @Box_of_the_Fox 4y

      TS is great. React just sucks

      1. @ixplo 4y

        what does ts give you. number-string errors protection and slightly better code-autocompletion? what it great for?

        1. @Box_of_the_Fox 4y

          Hints in IDEs that work

  12. @ixplo 4y

    :)

  13. @Box_of_the_Fox 4y

    Also if you are unfortunate working on spaghetti it sometimes helps figure out were some objects are created

  14. @ixplo 4y

    sometimes... but you have to maintain ts constantly for such benefits

    1. @Box_of_the_Fox 4y

      If you don't maintain your code then lack of types will make your life even worse

  15. @ixplo 4y

    and like I sad ts coders and development process are more expensive :(

  16. @Box_of_the_Fox 4y

    Random garbage data going around without any idea what is what

    1. @GenerauKowalski 4y

      Exactly

  17. @ixplo 4y

    the longest string from image could look like that in js (to, from, next) => {}

  18. @ixplo 4y

    that was about TS readability issues question

  19. @tsstgm 4y

    Or type naming

  20. @ixplo 4y

    readable names are must in good code

    1. @RiedleroD 4y

      C: uint8_t Rust: u8 Java: straight up doesn't have that type

      1. @ixplo 4y

        didn't get it. Are these built in types?

        1. @RiedleroD 4y

          it's the names for unsigned 8-bit Integer types

          1. @ixplo 4y

            it's ok for built in types

            1. @RiedleroD 4y

              I was making fun of Java here

      2. @LonelyGayTiger 4y

        You clearly have 0 understanding of java. It's called a byte.

        1. @RiedleroD 4y

          those are signed afaik

          1. @LonelyGayTiger 4y

            Weird. You might be right there. I was sure they weren't. This is the problem with working with so many different lanugages on a day to day basis. Easy to get things mixed up. My apologies for the mix up.

            1. @RiedleroD 4y

              yeah, I get it. Working with C++, rust, python, Java, and sometimes even js in the same week is confusing me too sometimes.

              1. @LonelyGayTiger 4y

                Yeah. At home I'm working with primarily C++ and Java, mostly powershell and js at work.

  21. @ixplo 4y

    I'm talking about user created vars and types like mainHeaderNavigationAccessRules :)

    1. @newmankrr 4y

      Go ahead, abbreviate it and expect someone else to understand what that variable means later. You call lack of readability having long names, (and if you can write a shorter/better version of it, ofc it's better to keep the shorter, that's not always the case) but in my opinion it's better describe what exactly that does than having it be miss-used somewhere. You do you, tho

      1. @ixplo 4y

        nono long names is a good idea. in js we barely have enough space for them. But TS leaves us no chance. And we are getting code from my pics above

        1. @newmankrr 4y

          Correct me if I'm wrong, but isn't that code on the pic from the source code of the library? Unless you are willing to contribute to the lib, I don't think there's a problem with that. Their code tends to be more difficult to read, since they are abstracting some concepts, but it's better to type it like that, than having to write a thousand if statements on each function just to check if the parameters have the correct type (which is what happens in js)

          1. @ixplo 4y

            I think you wrong because ts doesn't check types in runtime. And we shouldn't do that in js

            1. @newmankrr 4y

              I didn't say that ts checks types in runtime. The reason is said that ts prevents some bugs from happening, is exactly because it works on build time, instead of runtime. On js, these bugs that can be prevented on build time with ts, will only be seen when that piece of code is executed

            2. @newmankrr 4y

              What I was saying was, things like function(x) { if (typeof x !== "function") throw new Error("x type must be function") } that you can find on js libraries, are not needed when using ts

              1. @ixplo 4y

                this code is ok only if user or something out of your team can affect argument x. (or when it's right program behavior set by business logic) And TS won't help in this situation. Waiting for probable bad data from other modules is antipattern.

    2. @ixplo 4y

      it was example of pretty good name

  22. @VladislavSmolyanoy 4y

    Don’t care about your arguments. Strong types > weak types

  23. @ixplo 4y

    :D

  24. @ixplo 4y

    np

  25. @ixplo 4y

    TS works only in IDE and at the build time. And it doesn't matter what kind of code we talking about: library or your project code. TS is always less readable. That's the price for type checking in IDE. Yes it can help in difficult situation. But the price is continuous additional work around TS and it's disadvantages

  26. @ixplo 4y

    but maybe it was just a bad example. And yes, I know that TS is for error prevention. It's obviously

  27. @ixplo 4y

    by the way unit tests prevents such errors. TS becomes more useless with such tests. But people uses both. It's like fashion more, not necessity

  28. @jhintux 4y

    Js is a mistake yet we have to use it 😗🖖

  29. @azizhakberdiev 4y

    To code in js you should think as js

Use J and K for navigation