Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We should never have to deal with low level primitives like functions and variables - it’s 2018 why are we stuck in the 50s?


That is an incorrect analogy. Semaphores are the "goto" statement of the concurrent world.

Semaphores are not typed. They is no semantic connection to the thing they protect. Debugging concurrent systems with mutual exclusion enforced through these low-level primitives is a nightmare.

If you forgot to lock/unlock, you'll never know! The compiler cannot check it. Deadlocks are imminent.

We've had better abstractions since the 80s. Conditional critical regions, monitors, and (ideally) protected objects. Hell, even guards are better than semaphores and mutexes - at least they are associated with their critical region!

I struggle to think of situations where a semaphore is the best choice. Maybe in extremely high-performance cases, but even then the compiler can usually make a better decision.


Well, Alan Key pretty much said that in the 70s, and has stuck to his high level guns all this time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: