Hacker News new | ask | show | jobs
by Koshkin 1886 days ago
Well, it's like saying that wearing a straightjacket makes you a better person.
3 comments

A while back there was an interesting post about dry stone walls[1] (e.g. stone walls erected without any mortar). The top comment included this recommendation for beginners in stone masonry:

> When you pick up a stone from the pile, it MUST be placed on the wall. You either have to make it fit your intended spot through rotation or another adjustment, or you have to find another place on the wall for it. It CANNOT be placed back on the pile.[2]

The post explains that using this restriction makes you a better masonry overall because you train your self to the exact skills required. I find this a lot better analogy to restrictive programming languages then a straitjacket. When you restrict your self to always place a stone you pick up, you train your eyes to first evaluate which kind of stones you need next, and you train your self to find that stone in a pile. I don’t see exactly what you are training exactly when you wear a straitjacket.

1: https://news.ycombinator.com/item?id=20455860

2: https://news.ycombinator.com/item?id=20469600

> I don’t see

Neither do I.

Just like a straitjacket stops you from hurting others, Rust stops you from writing memory unsafe code.
straitjacket: related to the word strait.