logoalt Hacker News

mrkeentoday at 8:07 AM1 replyview on HN

This doesn't follow at all!

  Dropping interactivity [keep Concurrency, mutability]:

  The most popular choice is to drop interactivity: since there is no one to randomly access runtime data, there are no concurrency issues. C, Rust, Go, the list of languages that go this way is long.
No-one to randomly access runtime data? Do "other threads" not count? There are no concurrency issues in C?

  Dropping mutability

  What if you could not really change data? Instead of reading the value of a variable, you could have the runtime systematically (and safely) copy the value and return it to you.
Why would you copy anything? Copying is defense against mutation. It's what you do for safety when you're working in a language with pervasive mutation, and it's opt-in and manual, meaning it works about as well as other opt-in and manual operations, like malloc and free.

Peeking over the fence at an immutable language and thinking "that runtime does too much copying, which is bad!" is like peeking over the fence at a GC language and thinking "that runtime does too many mallocs and frees, which is bad!"


Replies

phil-martintoday at 8:31 AM

I believe the article is written from a lisp point of view where it interactivity is inspecting and modifying the application itself while it is running. It’s assuming that the software has already been written with no existing concurrency issues, but when a person comes along and does something unexpected and rewrites pose of the application or in the example they gave, modifying a hash map, things break.

They used C as an example because under normal circumstances you compile a binary and don’t modify it at runtime.

I’m not doing to defend it to strongly though, I _think_ that is what they were getting at, but to be honest I found much of it confusing.

show 3 replies