Inverse Sapir-Whorf and programming languages

46 points by spookylukey


munificent

Really cool article.

One way to think of language design (both programming and spoken) is that by choosing what elements you put in the language, you choose where you think a user should put their attention. C implicitly says "we want you to care about memory management". Haskell says "we want you to care about what types variables and expressions can contain".

When the language guides you in a way that aligns with where you do want to put your attention, it feels well suited for the job. When it doesn't, it feels like you're at a cocktail party trying to listen to a quiet speaker while someone across the room is yelling and distracting you.

Our attention is, I think, our most precious resource, so it makes sense to be mindful of how our tools guide and shape it.

cole-k

I'm not sure I fully grasped the point of the post, but it did bring to mind a drum I've been beating for a while about Rust. So apologies if this is tangential.

Rust occupies this weird space where it allows you to work with references but has strict rules about them to ensure that memory is safe. If I were writing C++ and I think something should be a reference, I make it one and then hopefully don't suffer the consequences. If I were writing Python, I copy my data with reckless abandon because I don't have that kind of control. But in Rust you can get caught in this optimization hole where you think "let's make this a reference because copying data is inefficient," and then the borrow checker yells at you but you're sure it is safe to be a reference so you spend an hour refactoring your code.

Many good Rust programmers say "just use .clone, RC, Box, etc." and I agree. But that doesn't change the fact that references are available to you and you are quite sure it would be safe to use one. So it sits weirdly because you know you could make it "better" but you've decided to make it worse to appease the borrow checker.

So I can kind of understand why some (many?) people throw up their hands and say "the borrow checker is too much for me" --- I assume they've fallen into the same trap.

frogulis

Awesome. Love the topic, love too that it talks a bit about Turkish grammar (a topic I hear far too little about).

Another common example: Plurality is a detail that can be omitted in some languages, e.g. Vietnamese.

And it was very pleasing to see a link on the word "exaggerated", think "I wonder if that link points to an article about Arrival", then discover that yes, yes it does. A movie beloved by many but I couldn't suspend my disbelief -- like science fiction but the "science" is some kind of magic linguistics.