I made a mistake. Hope you will learn something from it.
Heuristic, tl;dr for the purposes of this article – mental shortcut. The brain chooses to do less thinking to save energy. It relies on simple rules to get the result. The result is correct… some times.
I took a mental shortcut when working on my own programming language, Next Generation Shell. It was a mistake.
Additionally, I have ignored the uneasy but very vague feeling that what I’m doing is not 100% correct. From my experience I knew I shouldn’t ignore it but I still did it. Another mistake.
Below are heuristics that led to the wrong decision.
Copying features from popular languages is pretty “safe”. After all, “everybody” is using the language and it’s OK. Social proof. Wrong. Everybody does mistakes. Popular languages have design issues too.
It’s OK to copy a feature because it’s very basic aspect of a language. Nope. Python messed up arguments passing. And I copied that mess.
Python 3.8 has the fix. I have mixed feelings about it. Still not sure how I should fix it in NGS.
Beware of mental shortcuts. There are situations where these are not acceptable. The tricky part is to detect that you are using a mental shortcut in a situation where it’s not appropriate. I hope that with awareness and practice we can do it.
Also note that your $job is most likely paying you to not take mental shortcuts.