Average TS developer
Average TS developer
Average TS developer
tomatoes are fruits that are often used as vegetables and are botanically classified as berries*
*according to wikipedia and my interpretation of it
Intelligence is knowing that tomatoes are a fruit. Wisdom is knowing that they don't go into a fruit salad.
Charisma is selling salsa as a tomato based fruit salad
What if you soak them in high fructose corn syrup first?
Tomatoes are only fruits in a biological sense, vegetable is a culinary term so it makes no sense to mix them up.
I prefer just calling everything I eat the flesh of whatever it came from. Tomato? Flesh. Lettuce? Flesh. People? Flesh.
My understanding is that the term vegetable is actually a political term, meaning it is categorized as a vegetable for tax reasons.
Vegetables are taxed lower than fruits.
I mixed them up for the joke since the phrase sounds kinda absurd but it's technically true
According to some YouTube short (maybe it was vsauce?): botanically, fruits are vegetables so tomatoes are vegetables in both classification systems
In reality it really does not matter and the classification is somewhat arbitrary. Just think about adding it to a fruit salad. Would you do it? Then it's a fruit.
I've seen it too. I think it was Hank or John Green.
I once saw a little blurb at a sandwich shop stating that tomatoes are fruit, but if you pair them on a sandwich with jalapenos, you're getting both fruits and vegetables. I demand better scientific accuracy in restaurant marketing signs.
Now I wonder if jalapenos are fruit too (scientifically)
Vegetable has no meaning other than "part of a plant* we eat", so basically all fruits are vegetables
*And in the case of mushrooms, fungi
To add to this, vegetable is a culinary term and not a scientific term. Whereas, fruit can be both. Tomatoes are scientifically a fruit, but generally not from a culinary perspective.
Technically, according to the definition of a fruit, the cucumber is also a fruit, so yes, the tomato/cucumber salad is a fruid salad.
The fact that this meme makes sense to anyone demonstrates how dynamic typed programming languages cause brain damage.
I prefer to think of it as maybe don't shoehorn a shitty type checker into a dynamic language. Honestly I think people who get excited about typescript should fuck off and go write java instead.
JS is the one that's built into the browser. If JS wasn't built into the browser, it would go onto the trashbin of bad old languages that only survived because of their platform like VBA and ActionScript and .bat batch scripting. You can't compare JS to any other language because JS is the one you don't get a choice on.
The type checker is actually pretty smart and can handle a lot of weird use cases, especially in strict mode (if you mark everything as Any type, that's on you). The fact that the underlying language is very dynamic can be both good and bad. It's good because you can be flexible when you need to be, but it also won't prevent you from writing really shitty code, which lends it its reputation.
I don't know if you've ever tried writing frontends in Java, but it is terrible, especially if you want to make dynamic and accessible UIs. You don't use a power drill when you need to hammer a nail.
That's what WASM is for, but it's not there yet :(
And you still have to use js for hooks and stuff
I like TypeScript less for its ability to categorize my grocery list and more for its ability to stop anyone from putting cyanide on it.
I hate Typescript for promising me that nobody can put cyanide on the list, but in reality it disallows ME from putting cyanide on the list, but everyone else from the outside is still allowed to do so by using the API which is plain JavaScript again
Honestly, programming is great for teaching you that you are the stupid one. This is still a feature.
Fair enough.
Two questions immediately come to mind. 1) Would you buy the cyanide if it was on the list. 2) Where does one casually buy cyanide? I can't imagine a case where I'd need some, but it would be handy to know if I ever did.
I know you used to be able to get it for pest control, but maybe not anymore. You could also make it the old-fashioned way with molten washing soda. It can be used to make Prussian blue, for one thing.
Obviously take all necessary precautions, especially keeping NaCN away from acids.
Just one word: Apples.
I'd say its more like the gas tank telling you that you aren't allowed to pour in brake fluid as that could lead to runtime errors.
undefined
tank.pour(brakeFluid as Any); // do not remove this for some reason will break prod
So much funnier
Tomato: Any
Biologists: but tomato is a berry, which is subset of fruits
Also biologists: "vegetable" is purely a culinary term, and doesn't have any significance in the world of botany
As it happens, when we go shopping for food we have more of a culinary mindset than botanical.
A vegetable is edible plant matter.
Botanically a vegetable is anything that is not the reproductive portion of the plant derived from a flower. A root or tuber such as for yam or potato are vegetables. Edible flowers could be considered a vegetable since the ovary has not expanded to contain seed.
Exactly
Am I missing the joke? Tomatoes are fruits.
Intelligence is knowing Tomatoes are fruits.
Wisdom is knowing not to put them in a fruit salad.
Greek salad would like a word... the only things that aren't a fruit in Greek salad are the onions and feta.
Pragmatism is putting tomatoes with the vegetables because of taste, which is one of the most important parts of food.
As a proud Massachusettsan, tomatoes are definitely vegetables.
(Technically, tomatoes are both fruits and vegetables)
Aren’t fruits subsets of vegetables? Without looking it up I thought that vegetables were the edible part of the plant and fruits are edible reproductive parts of the plant. I could be totally off on that though.
Does this vary from place to place?
The joke is that almost everyone calls them vegetables because the botanic categorisation of parts of plants is niche jargon that is not useful in everyday life, whereas the culinary categorisation is useful, and so your shopping list correcting you is worse than unnecessary.
But that's not what TypeScript does. The joke in the meme doesn't really even make sense.
A better analogy would be you have a basket that's explicitly labeled "Fruit" and TypeScript complains if you try to put laundry detergent in it because you said it's supposed to be a basket of fruit.
This meme was clearly made by someone who doesn't use or understand TypeScript.
Well, that depends on definition. But the joke is why on earth would you want to write types on your shopping list? Like this:
Etc.
Why not? If a shop is having a sale on fruits only then I would like to sort out all the fruits quickly.
To be conformant with PEP-8.
Well, I can't think of an English example from the top of my head, but in German the words for Pear and (light) bulb are the same. So there are some exotic use cases.
So that the mindless automaton delivering your groceries doesn't unexpectedly give you tomatoes for your sundae, in a future expansion to dish-based orders.
I've yet to create a type error that didn't correspond to me thinking about something wrong.
I swear to god, sometimes I really don't know what Typescript really wants from me. It's like some old god: you know it needs a sacrifice but the god is not telling you exactly what he wants. So you can only try and pray.
Idk, I find it pretty easy to understand
The "return type <5 paragraphs of various word salads> is not compatible with " error messages are anything but easy to understand in my opinion.
Typescript got a lot easier for me when I stopped even trying to read the error messages
I'm a bit disappointed that nobody mentioned Rust yet.
Yeah... What?
Tomatoes are fruits.
Botanically they are. Culinary they are not.
Some languages split the word "fruit" up in those two cases. In Dutch for example, the botanical definition of fruit translates to "vrucht" whereas the culinary definition translates to "fruit".
So, a tomato is a "vrucht" but it's not "fruit"
Some languages split the word "fruit" up in those two cases
I wish English did this more. There's way too many words with an overly large number of meanings.
The word "free" meaning both "freedom" and "doesn't cost money" can be confusing - some languages use "gratis" or an equivalent word for the latter definition. Sure, you can use it as a Latin loan word in English, but that's not common.
Would you put a tomato in a fruit salad?
Aren't they berries, tho?
Guess it's not only Typescript that likes to argue with the developer while missing the entire point...
somewhere brodie lee just threw some papers
Evil Uno hits the floor wailing.
Report -> I'm in this picture and I don't like it
Intelligence is knowing that tomato is a fruit, wisdom is not putting it in a fruit salad
Charisma is being able to sell a fruit salad with tomatoes in it.
Dexterity is hacking everything into nice looking pieces.
but 'ketchup goes on anything!'
my grampa
I've seen versions of this meme before but I just noticed what he's wearing. Is that a Mortal Kombat shirt?
I don't like it but God help me if I try to bring up that we shouldn't use it. I understand it I just don't like how it slows everything down for in my opinion is not much gain.
As someone who is relatively new to webdev stuff, I gotta ask... what is the point of typescript? Like, is it faster than JS, does it have more functions or smth? To me it just looks like JS with extra steps and a really, REALLY cursed way to declare variables.
As a beginner you don't see the benefits as it is indeed JS with extra steps. It's not worth it for small projects and prototypes, but once you start having larger projects where you need to refactor something, you'll see the benefits.
Also, auto-complete.
Types help you prevent errors while writing the code instead of while running. That's a massive benefit, as it literally makes a lot of errors impossible (as long as you don't work around it) - otherwise you have to write a lot of tests to get the same guarantees, and you could always miss something by doing that.
The other benefit is that it allows other developers to understand your code very, very quickly. Types describe what your data looks like - there is nothing more important in programming than that!
When you install an NPM library and your editor gives you hints about parameter types, return types etc., that's all Typescript types at work.
After maintaining a huge JS codebase for years and finally upgrading it to TS, my life is so much easier. Refactoring is faster and less error-prone. I no longer have to manually document the parameter/return types for every function. I don't have that gnawing "oh damn, what if I missed something" feeling whenever I make changes.
Yes it's a bit more work up front but it pays dividends on larger codebases.
Your answer and mine are complementary, they definitely complete each other! Well done!
It helps for when you have a variable that's for numbers and you use it as a string or something else, it shouts an error. In other words, it protects you from yourself
No, it is slower than JS but it can be compiled to JS. The point of typescript is bringing static (or generally talking, predictable) types to variables, so that treating erroneously a number as a string should be more difficult. In a large codebase, it's easy to make mistakes and debugging is not instantaneous but it needs time. Typescript helps here. You write more code but it helps you out later
I don't have much experience with TS, but in other strongly typed language it goes even further than string vs number.
For example you can have two numbers Distance and TimeInSeconds and even though they are both numbers, the type system can make sure that you won't do distance+time.
It can also let you do distance/time and return Speed type.
It will prevent many logical errors even though everything is technically a number.
TS syntax is still the most cursed thing I've ever seen
Typescript gives you better suggestions, red squiggles where you would get errors or bugs if you try to run it, more information about whatever it is you’re using that’s defined somewhere else, and some other neat stuff like project-wide renaming that works every time.