JavaScript Trauma Fuels Static Typing Obsession
Why is this Languages meme funny?
Level 1: Once Burned, Twice Shy
Imagine you touched a hot stove when you were little and burned your hand. Ouch! đ˘ That probably scared you quite a bit. After that one bad experience, you might decide âStoves are dangerous, I never want to go near a stove again. In fact, all hot things are bad!â Now, is that really true? Not all hot things will hurt you â a warm cup of cocoa wonât burn if youâre careful, and stoves, when used properly, help cook yummy food. But because you got hurt once, you feel a big fear of anything similar. You insist on eating only cold sandwiches and ice cream, because you think heat = bad no matter what.
Thatâs basically whatâs happening in this joke. A developer once got âburnedâ by a programming experience (it was painful, like the stove burn). In their case, the âhot stoveâ was writing code in a language where the computer didnât warn about certain mistakes (so the mistakes caused problems later, which was scary for them). Now theyâve become afraid and say, âanything like that must be bad!â Itâs a funny exaggeration â we know not every situation will be like that first bad time, but the personâs fear makes them overreact and declare ânever again!â just like someone avoiding all stoves after a burn. We find it humorous because we understand the feeling of being once bitten and then overly cautious, even if itâs a bit silly to paint everything with the same brush. The meme makes us smile, because we see a little of ourselves being comically over-protective after a bad surprise.
Level 2: Safety vs Flexibility
Letâs break down the technical bits here. The meme is contrasting static typing and dynamic typing, so it helps to know what those terms mean. In a statically typed language, the type of each variable or expression is known at compile time (before the program runs). For example, in a statically typed language like Java, C#, or TypeScript, you might declare a variable and its type explicitly:
int count = 5;
Here the compiler knows count is an integer, and it wonât let you treat count as, say, a string later on. If somewhere in your code you try to do something that doesnât make sense for an integer, like count.toUpperCase(), the compiler will throw an error before you even run the program. This acts as a safeguard â many mistakes are caught early by the compilerâs type checker. Itâs like having a strict teacher grading your homework (the code) and marking mistakes in red pen so you can fix them before the final presentation (running the program). This can greatly improve CodeQuality for large projects, because itâs harder to accidentally mix up data types or call functions with the wrong kind of data.
On the other side, dynamically typed languages (like JavaScript, Python, Ruby, or PHP) determine types at runtime, meaning you donât declare them upfront and the language figures it out on the fly as the program runs. You could have a variable that starts as a number and later you assign a string to it, and thatâs generally fine by the language. Thereâs no compile-time type check to stop you. The flexibility is great â you can prototype quickly without dealing with a compiler yelling about mismatched types â but the downside is you might only discover type-related bugs when the program is actually running (sometimes in production, eek!). Itâs as if the teacher isnât looking at your homework at all; you only find out you did something wrong during the final presentation itself, potentially in front of everyone.
Now, what about JavaScript (JS) specifically? JavaScript is a dynamically typed language, and also a weakly (loosely) typed one. Weakly typed means the language will implicitly convert types in certain operations instead of stopping you. This is a source of many âWAT?!â moments in JS. For example:
console.log("5" + 5); // "55" (JS converts the number 5 to string "5", then concatenates)
console.log("5" - 2); // 3 (JS converts the string "5" to number 5, then subtracts 2)
console.log(5 == "5"); // true (loose equality `==` allows type coercion, so "5" becomes 5)
console.log(5 === "5"); // false (strict equality `===` checks type too, so number vs string is false)
Weird, right? Depending on the operator, JS sometimes treats strings as numbers or vice versa. If youâre not aware of these rules, you can get very confused why "5" + 5 didnât yield 10. This kind of behavior can cause bugs that are hard to catch because the language wonât flag it as an error â it will just do something, and that something might not be what you intended. Developers jokingly refer to these quirks as part of âJS madnessâ or js_trauma in meme-speak. Itâs the gotchas that bite you when you least expect it.
So what do developers do after being bitten a few times by such issues? Many turn to TypeScript (TS), which is basically JavaScript with static typing added. TypeScript lets you annotate your code with types and will check them at compile time, just like a statically typed language. For example, consider a simple JavaScript function:
// JavaScript (dynamic typing example)
function greet(name) {
return "Hello, " + name.toUpperCase();
}
console.log(greet(42));
// This will run, but at runtime you'll get a TypeError: name.toUpperCase is not a function
// because 42 is a Number, and we tried to call a string method on it.
In pure JavaScript, the above code is totally legal to write. You wonât find out anythingâs wrong until you actually run greet(42) and the program crashes or throws an error, because 42 (a number) doesnât have a toUpperCase() method. Now, hereâs how it looks in TypeScript:
// TypeScript (static typing example)
function greet(name: string): string {
return "Hello, " + name.toUpperCase();
}
greet(42);
// Error: Argument of type 'number' is not assignable to parameter of type 'string'.
In TypeScript, we declared that name must be a string, and that the function will return a string. When we try to call greet(42), the TypeScript compiler immediately complains: we passed a number where a string is expected. Boom, caught at compile time! Thatâs a win for static typing â the bug is stopped before the code ever runs. This is the âsafetyâ aspect static-type enthusiasts love. We avoided a potential runtime failure with a simple type check upfront.
Now, the meme jokes that this love of static typing can become an obsession, especially if itâs born from JavaScript trauma. Itâs like after debugging countless unpredictable issues, a developer might say, âIâm never going back, static types only for me, thank you very much!â They might start dismissing DynamicTyping languages as inferior or âunsafe.â This attitude is what the meme highlights: "All dynamic typing must be bad." Of course, in reality dynamic typing isnât inherently bad â itâs all about using the right tool for the job and managing its risks. A lot of experienced programmers actually use both kinds in different scenarios. For quick scripts or when doing data analysis, Python (dynamic) is fantastic because you can write less code and iterate faster. For huge, mission-critical software, something like Java or Rust (static) can provide that extra confidence in correctness and maintainability.
The âknee-jerk reactionâ mentioned in the meme text refers to an automatic, emotional response. Here it implies the developerâs preference for static typing might not come purely from rational comparison, but from an emotional place â being fed up with JavaScriptâs loosey-goosey nature. We have a term âstrong opinions, loosely heldâ in tech, but sometimes after a bad experience those opinions become strongly held, period đ . The meme laughs at the idea that instead of calmly saying âWell, maybe I prefer static typing because it suits large projects better and I had some bad bugs in JS,â the person jumps straight to âDynamic typing = bad, full stop!â Thatâs a big generalization. Itâs funny because itâs like someone declaring a LanguageWar based on personal scars. And indeed, if youâve ever browsed programming forums or Twitter, youâll see folks heatedly debating TypeSafety in exactly this black-and-white manner. One side says, âIf youâre not using static types, youâre writing bug-ridden code and you donât even know it!â The other side might retort, âStatic types are a straitjacket; I can achieve the same reliability with tests, and I can move faster.â Round and round it goes. These are the classic LanguageWars the tags mention â passionate debates often fueled more by pride and anecdotes than objective data.
The meme is squarely poking fun at the static-type side when taken to an extreme. It doesnât say static typing is bad (indeed, the scenario assumes static typing feels like salvation to that dev). Rather, itâs the dismissal of the other side thatâs the joke. We see this kind of sentiment in tech a lot: e.g., a developer had a nightmare with PHP, so now they claim âPHP is the worst language everâ and refuse to touch it or any similar dynamically typed, interpreted language. The truth is, any language can cause pain if used in the wrong context or without proper discipline, and any language can also be made to work with enough effort. But itâs way funnier to exaggerate it â hence "NO, all dynamic typing must be bad." Itâs a hyperbolic way to say, âI refuse to even consider that my stance might be influenced by past pain; Iâm just going to label the entire category as bad.â
Also, a quick note on the Simpsons Skinner meme format: Itâs visually a two-panel scene from The Simpsons cartoon. Principal Skinner is shown thinking in the first panel (with the text overlay of his inner monologue), and then looking resolute in the second (with the text of his conclusion). Meme-makers love this format to depict someone rejecting a moment of self-reflection in favor of denial. Here, the trauma from JS is the cause for self-reflection, and the denial is writing off dynamic typing entirely. The bright blue sky and cartoon city in the background make it instantly recognizable and add to the comedic contrast: a serious confession of âtraumaâ on a silly cartoon image. Itâs classic DeveloperHumor to take an emotional truth and package it in a lighthearted way. So even if youâre a junior dev, now you know: static vs dynamic typing is a hot topic, and this meme is a playful jab at how emotionally attached we programmers can get to our favorite tools, sometimes for reasons we don't admit openly (like that gnawing memory of a particularly nasty JavaScript bug đ). The takeaway: JavaScript (as a dynamic language) is fine and very powerful in capable hands (yes, even without TypeScript â hence the post message âJS is fine even without TSâ), but our meme character is too scarred to agree, and thatâs what makes it funny.
Level 3: Knee-Jerk Typecasting
This meme hits home for many seasoned devs because it satirizes a familiar character in the ongoing LanguageWars: the ex-JavaScript programmer who has swung to the extreme end of StaticTyping advocacy. Picture a developer who spent years wrestling with untyped JavaScript code â late-night debugging sessions chasing down undefined is not a function errors, data type mix-ups causing weird bugs, and a general feeling that their code was a fragile Jenga tower ready to collapse. That kind of experience can indeed be traumatic in a developer sense. We jokingly call it "JS PTSD" (with a wink to real PTSD, though of course it's an exaggeration in this context) when someone has been burned so many times by JavaScriptâs dynamic quirks that they develop a reflexive aversion to anything without a compiler-enforced type system. This memeâs first panel captures that flicker of introspection: âCould it be that my obsession with static typing is actually a knee-jerk reaction to trauma caused by JS?â â itâs Principal Skinner (from The Simpsons) momentarily considering that maybe heâs the one out of touch (a riff on the classic scene where he asks, âAm I so out of touch? No, it's the children who are wrong.â). Here, Principal Skinner personifies the stubborn developer archetype. He almost realizes, âHmm, perhaps my zealous love of static types isnât purely objective truth, but rather trauma talking.â Thatâs a pretty mature self-assessment⌠which he immediately throws out the window in the next panel.
In the second half, Skinner stands firm and declares, âNo, all dynamic typing must be bad.â đ This punchline is funny because we recognize the exaggeration: instead of acknowledging any nuance, he doubles down on an over-simplified conviction. Itâs the equivalent of someone saying, âI had a terrible experience with one JavaScript project, therefore all dynamically-typed languages are garbage.â It lampoons that black-and-white mentality. Developers with some battle scars often fall into this trap. For instance, a programmer might spend months untangling a messy untyped Python or JS codebase (perhaps dealing with mysterious runtime crashes because an API returned {} instead of the expected array, and nothing in the code explicitly said what type to expect). Exhausted and frustrated, they emerge from the ordeal swearing allegiance to the strictest compiler they can find. Suddenly TypeSafety becomes their holy grail for CodeQuality: they start evangelizing languages like TypeScript, Java, Rust, or Kotlin â anything that will yell at them at compile time if they even think of mixing up types. The meme pokes fun at this almost religious conversion experience. Itâs the âIâve seen things, man, horrible things in JavaScript⌠never again!â energy.
The humor also lies in the dismissal of dynamic typing as an overreaction. Anyone who has been around different languages knows that dynamic typing isnât âall bad.â In fact, many developers enjoy dynamically typed languages for their DeveloperExperience (DX): they can be more flexible and faster for prototyping. Think about why JavaScript became so popular in the first place â it was easy to write small scripts without a lot of ceremony. No compiling, no worrying about strict type definitions for every little variable â just write and run. That immediate feedback loop and agility is great for certain tasks. But scale that up to a huge application with dozens of developers, and the lack of upfront structure can lead to the infamous âJavaScript jungle,â where youâre unsure what type of data is flowing through functions, and one misuse can crash the whole app at runtime. The meme zeroes in on a developer who has lived through that jungle and made it out alive, albeit a bit scarred.
The âstatic-typing obsessionâ mentioned is something like an engineerâs coping mechanism. Having a compiler as a safety net can feel like finally getting a sturdy leash on a hyperactive dog that used to yank you all over the park. Suddenly that chaos is under control â the code wonât even compile if something doesnât match the expected types. Itâs a relief! Developers often describe moving from JavaScript to TypeScript (or to a language like C# or Go) as a kind of stress reduction: âNow I can sleep at night, the compiler has my back.â The meme character clearly felt this relief and then some â heâs become dismissive of any code that doesnât have those guarantees. Itâs like someone who had a bad experience with raw pointers in C and runs screaming to a garbage-collected language, then proclaims all manual memory management is evil incarnate. Thereâs a kernel of truth (manual memory is hard and risky), but the all-or-nothing stance is humorous because of its absolutism.
Within developer culture, this rigid stance is a known trope. We joke about the person who responds to any JavaScript problem with âjust use TypeScript, problem solved,â or the ones who call Python âa toyâ because it doesnât force static types at compile time. Itâs a form of confirmation bias â after suffering failures in one paradigm, they attribute all those problems solely to the lack of static types, and then see static typing as the silver bullet for any future problem. Realistically, thatâs an oversimplification. Plenty of dynamic language projects succeed, and conversely, static languages have their own pitfalls (ever debug a NullPointerException in Java or fight the compiler because your use-case doesnât fit its strict type rules? Itâs not always sunshine and rainbows). Senior developers tend to learn that each approach has trade-offs: for example, static typing can indeed catch a lot of bugs early and make code maintenance safer (and provide awesome IDE auto-complete, which improves DX), but it can also make simple tasks more verbose and rigid. Dynamic typing gives you quick iteration and simplicity at the cost of possibly more bugs slipping through if youâre not careful with testing. The meme is funny because Skinnerâs character blatantly ignores this nuance even when itâs staring him in the face (literally, his own thought was admitting it might be a knee-jerk reaction!). Instead, he personifies the stubborner side of the tech community that loves to declare, âmy way is the One True Way.â We laugh because many of us have encountered that person â or have even been that person at some stage in our careers â and we recognize the mix of truth and exaggeration.
Another layer of humor is the Simpsons meme format itself. The scene is a direct parody of Skinnerâs famous quote, âNo, itâs the children who are wrong,â which has become an internet shorthand for someone refusing to accept they might be the problem. In this developer twist, Skinner (the dev) contemplates if his fanatic love of static typing is out of touch, then immediately rejects that idea, effectively saying, âNo, itâs dynamic typing thatâs the problem, not me.â Itâs a perfect fit because it shows the irrational denial. The bright cartoon backdrop and Skinnerâs exaggerated pose accentuate the comedic tone. We as viewers understand that the rational conclusion would be âhmm, maybe I overdid the static typing thing because of bad experiences,â but seeing him defiantly conclude the opposite gives us that ironic laugh. Itâs lampooning the ego and emotional baggage that developers sometimes carry with their tooling choices.
In practice, Iâve heard conversations that mirror this meme almost verbatim. Imagine a team discussion: someone suggests using Python for a quick script, and a battle-hardened colleague immediately interjects, âPython? No way, dynamic types will come back to bite us. We need Java/Go/TypeScript, something with a compiler!â If you probe a bit, you find out that colleague once spent days tracking down a bug caused by a wrong type in a JavaScript app, and now theyâre extremely wary. Their experience is valid, but the resulting stance can be a little extreme. The meme playfully calls out that bias â itâs basically saying, âHey, you might want to examine why youâre so averse to dynamic typing⌠could it be feelings rather than pure facts?â Then it shows the answer: âNope! Must be that all dynamic typing is inherently bad.â That jump to conclusion is what makes it DeveloperHumor gold, especially for those of us whoâve been in the industry long enough to see this pattern recur. We laugh, and maybe we also cringe a tiny bit, because it hits on a real tendency to let past pain dictate our technology prejudices. In short, the meme uses a classic cartoon moment to roast the knee-jerk static typing purist in all of us, highlighting how easily a rough stint with JavaScript (JS) can flip someone from âJavaScript is fineâ to ânever again without TypeScript!â faster than you can say console.log("Hello, world");.
Level 4: Type Soundness Under Fire
In the world of programming language theory, static typing vs dynamic typing is a fundamental design trade-off often framed in terms of type soundness. A statically typed language enforces type rules at compile-time, aiming to guarantee that certain type errors cannot occur at runtime. There's an academic mantra: "well-typed programs can't go wrong" â originally quipped in a 1974 paper by Robin Milner â meaning if your code passes the compiler's strict type checks, it wonât hit type mismatches when running. This slogan is a bit tongue-in-cheek (programs can still go wrong in other ways, like logic bugs or runtime exceptions outside type checking), but it captures the essence: static types provide a mathematical safety net. Under the hood, compilers for static languages (from C++ to Haskell) use formal rules to ensure type safety (often proved via the Progress and Preservation theorems in type theory). In simple terms, Progress means a well-typed program can always take a step (it wonât suddenly get stuck on a type error), and Preservation means those steps never break the type rules (types of values are preserved as execution proceeds). These guarantees are like armor â ensuring that certain classes of bugs (like calling a string method on a number) are statically impossible. No matter how large the codebase, if it compiles, you have a proof (of sorts) that those type errors wonât bite you in production.
On the flip side, dynamically typed languages perform type checks at runtime, or sometimes not at all until an operation fails. They correspond more closely to the untyped Îť-calculus (with values carrying runtime type tags) where any operation is allowed and you only find out if it was valid when you run the code. This gives a great deal of flexibility â you can compose functions and data structures in more ad-hoc ways â but you donât get the compile-time guarantees. Academically, you might say dynamic languages maximize expressiveness and completeness: theyâll try to run any program you throw at them (theyâre complete in the sense that they donât reject programs that might actually be okay), but they sacrifice static soundness (nothing stops you from writing something type-risky). A static type system, in contrast, is intentionally conservative â it rejects some programs that would work at runtime, in order to guarantee that all the programs it does accept wonât encounter type errors. This is a classic completeness vs. soundness trade-off. The developer in this meme has clearly been burned by the unsoundness side of the bargain: JavaScript, being dynamically (and loosely) typed, let them write code that blew up later. Their trauma, viewed through a theoretical lens, is essentially a reaction to the absence of a strong static guarantee in JavaScript.
From an academic perspective, this scenario could also be seen as encountering the limits of an unsound type system. JavaScript will cheerfully perform bizarre implicit type conversions (like treating [] as 0 in numeric contexts, or turning the number 5 and string "5" into "55" when using the + operator) due to its weak typing (loose coercion rules). This can violate a programmerâs mental model of type consistency, creating a cognitive dissonance that is â in a lighthearted sense â âtraumatic.â The knee-jerk retreat to strictly typed languages is like seeking refuge in a fortress of formal rules. After all, languages with strong static type systems (think of Rust, Haskell, or adopting TypeScript in the JavaScript ecosystem) act like meticulous gatekeepers: they refuse to even run your program if something as small as a type mismatch is detected. The meme humorously exposes a common over-correction: fleeing to the utmost end of the static spectrum as a remedy for the wild freedom of dynamic typing.
From a programming language evolution standpoint, this pendulum swing has happened before. In the early days, languages like Lisp (dynamic) and Algol or Pascal (static) offered starkly different developer experiences. Through the decades, weâve seen cycles: the flexibility of dynamic scripting (Perl, Ruby, vanilla JavaScript) becoming popular for rapid development, then a swing back as large codebases provoke demand for better tooling and reliability (enter Java in the enterprise 90s, or TypeScript for JavaScript in the 2010s). Thereâs even a field of research on gradual typing â finding a middle ground by allowing optional type annotations, so you can mix static and dynamic approaches. TypeScript is a prime real-world example: it lets you add types to JavaScript incrementally, effectively treating static typing as a trauma therapy for big JS codebases. (Funnily, itâs like giving JavaScript a comforting blanket of types to calm its erratic runtime behavior.) The memeâs protagonist, however, has taken an absolutist stance â rejecting dynamic typing outright â which reflects a kind of binary thinking not uncommon in tech, but at odds with the nuanced continuum that language theory recognizes. In truth, both static and dynamic typing have their theoretical merits and intrinsic limitations. The humor at this deep level comes from the developerâs logical fallacy: a form of overgeneralization (one might say post hoc ergo propter hoc in fancy terms) where they conclude âdynamic badâ from âJavaScript hurt me,â without acknowledging the broader context or the possibility of a more balanced middle ground. Itâs a reminder of the almost philosophical debates underpinning everyday coding â a battle between the certainty of types and the freedom of untyped code, playing out not just in systems and proofs but in the hearts of developers too.
Description
This is a two-panel meme using the 'Principal Skinner's Pathetic Fallacy' format from The Simpsons. In the first panel, Principal Skinner is looking thoughtfully out a window with the text: 'COULD IT BE THAT MY OBSESSION WITH STATIC TYPING IS ACTUALLY A KNEE-JERK REACTION TO TRAUMA CAUSED BY JS?'. In the second panel, he has a moment of realization and quickly dismisses the thought, saying, 'NO, ALL DYNAMIC TYPING MUST BE BAD'. The meme humorously captures the sentiment of developers who have experienced the pitfalls of JavaScript's dynamic and loosely-typed nature, such as unexpected runtime errors. It suggests that their strong preference for static typing (found in languages like TypeScript) is less a purely objective choice and more of an emotional overcorrection born from the 'trauma' of debugging JavaScript
Comments
98Comment deleted
The five stages of JS grief: denial, anger, bargaining for a lodash function, depression when you see '[] + {}', and finally, acceptance... of TypeScript
I swear Iâm not anti-dynamic⌠itâs just that every time I remember chasing âundefined is not a functionâ at 2 a.m. on Node 0.12, my fight-or-flight response autogenerates 300 lines of TypeScript generics
After spending three days debugging a production issue caused by '[] + {} === '[object Object]', you too would start treating every untyped variable like it's carrying a ticking time bomb. The real trauma isn't the dynamic typing - it's explaining to the CTO why a simple equality check brought down the payment service
After years of debugging 'undefined is not a function' at 3 AM in production, many senior engineers develop what psychologists call 'JavaScript PTSD' - a condition where the mere sight of 'any' in TypeScript triggers fight-or-flight responses. The real irony? We've now created type systems so complex that the type errors are harder to debug than the runtime errors we were trying to avoid. Perhaps the real trauma was the friends we made along the way... in the #typescript-help channel
JS trauma so real, static typing feels like compile-time bail bondsman for your runtime felonies
After enough JS, you realize static types are prepaid incident credits: a compiler screaming âType âneverâ is not assignableâ beats prod screaming âundefined is not a function.â
Policy update: after double-equals took prod down, we encode invariants in the type system - and politely ignore that TypeScript erases them at runtime
JS is disgusting Comment deleted
Full stop Comment deleted
it's trauma caused by Java Comment deleted
Java-Script Comment deleted
I'm a Java dev and I fucking hate Java. I would still rather be in Java than JS. Shits gross Comment deleted
as a dev who (forcibly) uses java and javascript, yea Comment deleted
it depends on the use case. I preach often, that JS is like mathematics, you must take care yourself, to not apply some operator to a wrong entity. Comment deleted
Imma be real chief, there is no use case for JS to me. It's cringe and should be eradicated Comment deleted
let's say matrix multiplication. it's meaningless by itself it gains a meaning depending on case with square matrices, aka. linear operators, multiplication works like function composition. with adjacency matrices it shows common neighbors of two systems. but a diablo 1 map can also be displayed as 2D array, aka. matrix. if you multiply 2 maps you will get trash in result, even though interface can be applied. the same is with JS. you need to think what you do. not all can do it, many programmers can only scroll through hundreds of methods looking for one doing exactly the task they want to solve. Comment deleted
then how would html5 games work ? Comment deleted
wasm Comment deleted
for scripting it's better then lua Comment deleted
They are all bad, tho Comment deleted
If they are all bad, maybe the problem is not with them... Comment deleted
with them, cause static type PLs are not all bad Comment deleted
ofc are they not. but you need static typing, where you need static typing, and you need dynamic typing, where you need dynamic. you don't need to generate hundreds of temlated classes where you just could use dynamic types. Comment deleted
just use agda haskell Comment deleted
yes Comment deleted
they help you do your work at least, instead of punching you in the stomach telling you something like "I know what you meant to do, but write it more explicit with more bloat code" oh yeah, great, the compiler understands me, but don't wanna be friends with meee Comment deleted
Lol, and also you have to make sure that each method that accept string(or any other data type) will cut all other possible data types. gl with that Comment deleted
what? Comment deleted
you wrote a method that compare 2 strings, user sent a integer and class into it, how will you handle it? Comment deleted
throw an error. dude Comment deleted
throw an error for what case? Comment deleted
just fail fast ever heard of it? Comment deleted
how much code do you need to write to decide is this error or not, and can it be casted in the string correctly? Comment deleted
0 Comment deleted
bullshit XD Comment deleted
you just don't get how to do it Comment deleted
tell me then Comment deleted
you misplaced it with Java Comment deleted
âŚthere's autocompletion for regular js too, yknow Comment deleted
Yeah, powered by the typescript language server Comment deleted
yep, but that doesn't mean you have to use ts Comment deleted
You don't have to but if you're still relying on ts tooling there's little difference. The only advantage of using js is not having a build step, which is probably pointless because you will still use some kind of bundler/transpiler most of the time. Comment deleted
will I though? what for. My php+nginx website runs good as is Comment deleted
still exists for regular js, in my experience Comment deleted
odd Comment deleted
I use static typing because 'dynamic' is a type. Comment deleted
Typescript compiler can typecheck js just as good as ts, it supports special jsdoc syntax for type annotations in comments. Comment deleted
again, odd. It does work for me đ¤ˇââď¸ Comment deleted
Just create a tsconfig and set it to something like allowJS: true checkJS: true strict: true Comment deleted
I don't have a tsconfig⌠Comment deleted
kate with the regular ts LSP Comment deleted
it's preconfigured, you just gotta get it to find your project root Comment deleted
Your data is any, there's nothing to suggest. You should give it a type, just like in ts. Comment deleted
because data is of type any here, obv you won't get far with js here. I get what you mean now, but that's not really a problem for me because of how I usually program js Comment deleted
fair Comment deleted
Both js and ts are cool. There are cases though when typing becomes too overcomplicated for some tricky functions and it doesnât work, so I would say itâs cool to use typescript when typing and fighting with compilation errors is not 90% of your coding. Personally I love ts for its type system and js for flexibility, so just choose your poison :) Comment deleted
For 'overcomplicated' cases (lets pretend they are real) you can resort to 'any'. Comment deleted
right, you can always rely on any as a last resort Comment deleted
as unknown, then pass to typeguards / inline checks to narrow down type (without making runtime vulnerable) Comment deleted
My coworker can't open other people's Python code without spending four hours writing type hints Comment deleted
don't put number where string is expected Comment deleted
let the service die in such case Comment deleted
easy Comment deleted
I did already Comment deleted
you did not, you said that you will write 0 code to handle other data types Comment deleted
you just don't handle them. you will get a compile error a forehead, and fix it, by not putting other data types into a function expecting string Comment deleted
why would you get compile error? Comment deleted
bc you put a number where none belongs to Comment deleted
you just don't get it Comment deleted
which is obviously bs Comment deleted
that's it Comment deleted
you don't have types to get compile error Comment deleted
in haskell? Comment deleted
no, I was talking about js Comment deleted
https://t.me/dev_meme/5561?comment=93488 Comment deleted
dude. that's just funny Comment deleted
or any other dynamic type in function definition language Comment deleted
look precisely Comment deleted
it's about haskell Comment deleted
sry than, I meant that js suck, not haskell Comment deleted
well. according JS why the hell should user do anything with code? Comment deleted
it still can by weakly casted to something and executed somehow, but result will be trash if you dont put strings into it. the problem is not JS, it's a programmer Comment deleted
There is bugs in any programmers code. Difference that it is much easier to catch if it's static typed language, compile error is much more comfortable to work with, unlike runtime error in prod Comment deleted
this is pointless. yeah. you are right. that's why all the data scientists and engineers use pandas. they are just masochistic bastards who love to suffer. I get it. Comment deleted
your cumfort is just bent to your use cases, until you run into one, where you will need to handle hundreds of types by hand, where just a generic Anything type is needed Comment deleted
-> handle hundreds of types by hand what do you mean? Comment deleted
if your interface is so abstract, that it can handle every or nearly every type in statically typed language you just use workarounds like upcast to a generic object or templating sugar, which generates every version of statically typed function bloating the binary. just take a dynamically typed language instead Comment deleted
took, you still have to handle hundreds of types by hand, but now you don't have compile error if you made a mistake somewhere XD Comment deleted
no you don't Comment deleted
you know, what invariants are for? Comment deleted
ima data engineer, I do work with hella a lot of types on very few interfaces. static typing is just a lot of needless work. because oftentimes I just need the layout of the data independently of the type. I just don't care Comment deleted
if I do care, I can explicitly cast it to some type ensuring it invariantness, and then I just know, a string is a string. and never a number or anything. what can't be converted either makes the service instance die, that it intended and handled elsewhere, or just left out of the data set with a warning Comment deleted
just use right tools for the right purpose Comment deleted
and lastly, no. not every program has bugs there are methods to write mathematically probable algorithms. they always work correctly. Comment deleted
you write function to compare 2 strings and put a number there well, why? Comment deleted
if you don't, then let it be the end of the conversation, bc it's just pointless without knowing how to use invariants Comment deleted
I never used JS and I'm still obsessed with static typing, checkmate atheists Comment deleted
Itâs love caused by Haskell Comment deleted