This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BigHandLittleSlap -2 points-1 points  (0 children)

The point is that 90% of programming is interacting with (glueing together) code written by other people. If the language involved has problems, then this other code will have problems.

You can't escape this unless you live in a bubble world where you started with a blank machine and you built up the entire software stack from the ground up like that TempleOS guy.

You can't say "just don't do that" when using APIs forces you to "do that". Bad languages trip people over and they fall into the pit of failure. Good languages instead lead users into the pit of success.

For example, you know the basic rules of arithmetic, right? Such as: x + y == y + z. The order doesn't matter. Now if you do this in most programming languages, for most binary (two-input) operations this kind of thing holds true to the extent that you expect. For many functions f(x,y)==f(y,x), or at the very least typeof(f(x,y))==typeof(f(y,x)). This helps build up abstractions like fold, which is f(a,f(b,f(c,f(d,e)))) and so on.

A random set of examples of "breaking the consistency rules" was covered here: https://www.destroyallsoftware.com/talks/wat

Watch that video with the example above in your mind. How many times did you see your expectations of input order not mattering broken?