Coding languages sux for dyslexics (in a one liner)

TL; DR : TD LR or RL ?

Imagine, you learn to read, if you read me actually, it is from top to down (TD) and then your eyes follow from Left to Right (LR).

Imagine as a teen you have difficulties with it (especially in mathematics).

And since you had difficulties in reading mathematics notation, you have problem with computers too.

What is code ?

It's is a flow of data created and consumed with a certain chronology, let's dare the world causality.

It is better if the stuff we abstract (a stream of causalities mixing data and operations) has the same properties in the notations. No ?
There is an arrow of time pointing always in the same direction. By reading convention TD LR.

Computers doing causal operations one after one another, should represent sequence flows in the same chronology.

Let's begin by the simplest instruction you teach/learn :

a = 42

You read a equals 42, actually, the computer is much more likely gonna do STORE 42 in a

The chronology is more obvious if you write

a = lambda:42

First the right hand is executed than stored in a

So we have a TD RL convention here.

Is it consistent ?

let's try this one :

a = 2
a = a * 2 + 1


Reading RL I now expect a to be 6.
Wrong it is 5, we read from LR now inside a RL sequence.

Now, imagine all the hell in this single line of code for someone confused with Right and Left

a = reduce(lambda x,y: 2*(x+y)-1, [ a * 2 + 1 if  a > 5 else ( effect(a) and 1 or 2 ) for a in range(10,-1) if a < 9 ])

The problem, is once a dyslexic can understand this kind of code, he writes it this way because once the learning curved is passed, he will not see the problem any more.







1 comment:

jul said...

Just noticed the LR notation that prevails in the Reverse Polish Notation that actually read LR is not the reversed notation in regards to my maternal language and the polish one.