#if you write server code in Javascript OR Typescript then your bloodline is weak
Explore tagged Tumblr posts
21st-century-minutiae · 4 months ago
Text
Javascript is a late twentieth century, early twenty-first century programming language most often used for client side functionality on the internet (that is to say, a webserver will send code to a vistor's browser, and the visitor will be the one using it). There are many quirks to Javascript that make it distinct among programming languages. One of which is its lack of type enforcement. Similar to other type unsafe languages (such as Python), Javascript allows users to use and abuse objects without mandating structure. By analogy, if you had an aquarium, a type-safe language would only let you put fish in it. Javascript would allow you to put anything in the aquarium and let you see if it actually can swim (or it it would explode the glass).
Typescript is an early twenty-first century open source extension of Javascript maintained by Javascript. Typescript code is essentially a shoving javascript in a type-checking suit. The code is nearly identical, but every single variable needs to have a type. The type script engine will read through the code and determine if any rules are violated. If they are, it will tell you what is broken. If it is not, it will produce the equivalent Javascript code to be handled by browsers.
Typescript is restrictive and can lead to some convoluted type logic to get things working that would just be permitted in Javascript. It also prevents many errors that are especially common in collaborative work. Its egregious safety also causes some annoying errors.
Most people in the early twenty-first century would be familiar with neither.
@typescript-official oh hello bitch
90 notes · View notes