memesearch
Refrain From Physical Violence

Refrain From Physical Violence

Download Find similar pictures
Text on the meme
the same thing. But they’re not. They both have ‘algebraic’ in the name, so it’s confusing. I got them mixed up at times. Others have too. But, they’re different concepts. Understanding the difference will help you if you’re trying to learn functional programming. We’ve already talked about algebraic structures. What are algebraic data types then? WHAT’S AN ALGEBRAIC DATA TYPE? An algebraic data type is a structured type that’s formed by composing other types. Or, even shorter, it’s a type made of other types. That’s it. Not super complicated at all. If you’re a working programmer, you use them already every day. And after reading this, you might think: What’s so special about that? In JavaScript, that’s arrays and objects, right? Why does that even need a special name? And you’d be right. Arrays, Objects, Maps, WeakMaps, and Sets are all algebraic data types. You can put values of many types ‘inside’ them (so to speak). No big deal. But, you might also notice a functional programmer over there. The one with a smug look and condescending smile on their face. And after bracing yourself, you ask them “What’s so amusing?” “Oh, you’re so cute,” they say, “Those are all product types. In functional programming we use sum types to model the business domain. That’s where algebraic data types really shine.” Now, let’s assume you manage to refrain from physical violence. After taking a deep breath, you might wonder: What are sum and product types? And why are they called that? We’ll start with product types, because they’re the most familiar.
What it means

A cropped programming textbook page explains algebraic data types and contrasts sum types with product types. The joke is the highlighted line about refraining from physical violence: the overly smug functional programmer’s jargon is so irritating that the reader may want to hit them, making this a reaction to pedantic programming explanations or frustrating technical discussions. EN: A cropped programming textbook page explains algebraic data types and contrasts sum types with product types. The joke is the highlighted line about refraining from physical violence: the overly smug functional programmer’s jargon is so irritating that the reader may want to hit them, making this a reaction to pedantic programming explanations or frustrating technical discussions.

Objects
Tags
Source
Type
image
Size
800×567 · 123.8 KiB
Mood
sarcastic, absurd
Language
en
Added

Similar memes