Part 5 - The World of Inequality

Started by CultLeader, June 03, 2021, 10:40:49 AM

Previous topic - Next topic

CultLeader

Earlier I have mentioned how I cannot stand the attitude that "every programming language is equal, but some are better for some things and some for others". Same with databases, infra management tools and you name it. Today we'll debunk this leftist cuck nonsense.

Humans

Consider every human and his attributes. Their height, their weight, how smelly they are, metabolism etc. All are decided by genes. So, if we just take one dimension of their height, does it make sense to categorize people among height? By centimeters? But there are tons of people that would be considered in the same centimeter of height, yet by milimeters they are still different height. So, height is a spectrum. There is not equality on all people by their height. If we picked two people randomly from this earth and I had to make a bet "are they the same height?" - I'd always bet against it, that they will be different height and be right 99% of the time.

Same with other dimensions, like weight, how smelly they are - all people are very different based on these dimensions. So, on single dimensions separately people are very different.

Now lets take all these attributes of single people and say that every person is described by an array of scores for each their attribute, from 0.0 to 1.0.

| name  | height | weight | smelliness |
|-------+--------+--------+------------|
| alice |    0.6 |    0.4 |        0.8 |
| bob   |    0.8 |    0.6 |        0.5 |


What are the odds that we will find equal rows in such tables with infinite attributes? Practically zero for every person on this earth?

Okay, now, consider we need to evaluate person on certain attributes being fit or unfit for the same job. Say, we need to evaluate basketball, and we pick few dimensions we need for people.

| name  | height | weight | speed | accuracy | quick thinking |
|-------+--------+--------+-------+----------+----------------|
| bob   |    1.0 |    0.5 |   0.3 |      0.1 |            0.2 |
| roy   |    0.8 |    0.9 |   0.1 |      0.7 |            0.4 |
| dylan |    0.8 |    0.4 |   0.9 |      0.9 |            0.8 |


And the sum of these attributes in float space would be the suitability of this person performing well in the basketball arena. What are the odds of summing these attributes being equal between candidates? Next to none?

So, we clearly see that humans are exceedingly unlikely to be equal amongst themselves either in one dimension attributes, in all their attributes or in specific job that they need to do attributes

Programming languages

Okay, let's apply the same logic for programming languages, with each attribute being 0.0 to 1.0, 1.0 being the best and 0.0 being the worst (all the values are my opinions)

| name  | typesafety | conciseness | syntax sugar | performance | memory usage | metaprogramming capabilities | total language power as sum of all |
|-------+------------+-------------+--------------+-------------+--------------+------------------------------+------------------------------------|
| lua   |        0.0 |         0.6 |          0.1 |         0.4 |          0.8 |                          0.0 |                                1.9 |
| ruby  |        0.0 |         0.9 |          0.8 |         0.1 |          0.2 |                          0.5 |                                2.5 |
| lisp  |        0.0 |         0.6 |          0.2 |         0.3 |          0.5 |                          0.6 |                                2.2 |
| rust  |        1.0 |         0.3 |          0.4 |         1.0 |          1.0 |                          0.7 |                                4.4 |
| ocaml |        1.0 |         0.8 |          0.2 |         0.9 |          0.8 |                          0.3 |                                4.0 |
| go    |        0.6 |         0.2 |          0.0 |         0.8 |          0.8 |                          0.0 |                                2.4 |
| java  |        0.5 |         0.2 |          0.2 |         0.7 |          0.0 |                          0.0 |                                1.6 |


What are the odds of these ever being equal among different programming languages? Some language will have to come over the top and have the biggest score.

As you can see, overall Rust somewhat overtook OCaml. But that assumes weights are equal, that is, I value all the properties equally in this sum. Let's see what I believe the weights are for each attribute from 0.0 to 1.0, as weights themselves aren't equal either. Same logic applies to weights of importance - these cannot be equal either!

| attribute name               | importance |
|------------------------------+------------|
| typesafety                   |        1.0 |
| conciseness                  |        0.6 |
| syntax sugar                 |        0.0 |
| performance                  |        0.5 |
| memory usage                 |        0.7 |
| metaprogramming capabilities |        0.0 |


As you can see, typesafety is paramount as I'm using the pattern in my projects. Consiceness, it should be decent, but perfect score is not necessary, it shouldn't be as bad as Java is all I'm asking. Syntax sugar, since I'm using the pattern and I can get as much sugar as I want is completely irrelevant. Performance, it should be decent, but not of paramount importance. Memory usage also should be decent as I want to get most out of cheap boxes, I don't want to have big beefy machines just so I could run memory hungry JVMs. Metaprogamming capabilities also are irrelevant as I'm using the pattern.

So, how about we multiply the weights with languages and see the final scores that we get?

| name  | typesafety | conciseness | syntax sugar | performance | memory usage | metaprogramming capabilities | total language power as sum of all |
|-------+------------+-------------+--------------+-------------+--------------+------------------------------+------------------------------------|
| lua   | 0.0 * 1.0  | 0.6 * 0.6   | 0.1 * 0.0    | 0.4 * 0.5   | 0.8 * 0.7    | 0.0 * 0.0                    |                               1.12 |
| ruby  | 0.0 * 1.0  | 0.9 * 0.6   | 0.8 * 0.0    | 0.1 * 0.5   | 0.2 * 0.7    | 0.5 * 0.0                    |                               0.73 |
| lisp  | 0.0 * 1.0  | 0.6 * 0.6   | 0.2 * 0.0    | 0.3 * 0.5   | 0.5 * 0.7    | 0.6 * 0.0                    |                               0.86 |
| rust  | 1.0 * 1.0  | 0.3 * 0.6   | 0.4 * 0.0    | 1.0 * 0.5   | 1.0 * 0.7    | 0.7 * 0.0                    |                               2.38 |
| ocaml | 1.0 * 1.0  | 0.8 * 0.6   | 0.2 * 0.0    | 0.9 * 0.5   | 0.8 * 0.7    | 0.3 * 0.0                    |                               2.49 |
| go    | 0.6 * 1.0  | 0.2 * 0.6   | 0.0 * 0.0    | 0.8 * 0.5   | 0.8 * 0.7    | 0.0 * 0.0                    |                               1.68 |
| java  | 0.5 * 1.0  | 0.2 * 0.6   | 0.2 * 0.0    | 0.7 * 0.5   | 0.0 * 0.7    | 0.0 * 0.0                    |                               0.97 |


And, as you can see, once the attributes which I care about most are weighted OCaml comes out as a clear winner, with Rust being second choice. Ruby and Lisp become utterly irrelevant, since they have no typesafety and hence cannot be used to implement the pattern. No language is equal either.

Same can be done with databases, infrastructure management solutions, IDE's - you name it. None of the outcomes of such analysis can be equal. Your job is to find the best one. And I don't mean "the best one for such and such usecase", I mean "the best one" ;)

Next time some leftist cuck says to you "I develop NodeJS and my code is as solid as what you do in OCaml because I spend double the development time writing muh precious unit tests" - refer such idiot to this forum post ;)