The hidden dichotomy of single variable vs binary

Binary distinctions, or really any distinctions that split people into a few buckets, are obviously kinda silly.

We use them a lot: starwars/startrek, nerd/jock (morphed into virgin/chad), blue-tribe/red-tribe, functional/OO, organic/anorgnaic, DL/classical-methods, religious/atheist/agnostic, lower-class/middle-class/upper-class, blue-collar/white-collar, family-(wo)man/bachelor(et).

Sometimes the categories are very much "real", there's a bit of a continuum between the buckets but not a lot. But oftentimes they are blurry, and then people have a field day inventing in-between categories and complaining about how restrictive they are.

But then again, people are very good at thinking in terms of continuums. When we think about or negotiate a wage, we think about a number or range, not about "small salary" vs "large salary". When we look at testing for a codebase we look at the coverage, not at "tested" vs "untested".

So what's the catch?

Well, it seems like we can't really think about a multi-dimensional continuum.

Functional programming is defined by a lot of vague things such as having many small functions, using a lot of pure functions, using strong typing systems, using immutable data structures, and calling options monads.

Object-oriented programming is defined by a lot of vague things such as having many small methods, having loads of classes, using mutable data structures and preferring exception-based error handling.

These are not necessarily traits of OO or FP, in a purely theoretical world; But they are in practice. If someone tells me they use a try/catch a least every 500 lines of code, I can bet my right arm that they are using a very OO-focused language (java, c++, python, node). If someone uses the word "monad" or writes extremely slow data-processing code, I can bet the left one they are using a functional language.

Even worst, OO and FP are not even defined on the same axis, you can have a "somewhat OO" codebase that's not "somewhat FP", and the axis they do kinda share (e.g. preference for strong typing) they are at the same extreme of.

Of course, the axes themselves are kind of arbitrary and could be further separated.

Still, I find it interesting that the only way we communicate about several continuous variables is by picking a point along each one's continuum and calling it a category. In spite of being able to perfectly well reason in continuous land about a single variable.

Published on: 2021-07-26










Reactions:

angry
loony
pls
sexy
straigt-face

twitter logo
Share this article on twitter
 linkedin logo
Share this article on linkedin
Fb logo
Share this article on facebook