3 ms·
You don't usually use semaphores directly in modern programming languages. Go does everything with channels and Rust covers a lot of cases with static analysis,
by whatshisface 4y ago
You don't usually use semaphores directly in modern programming languages. Go does everything with channels and Rust covers a lot of cases with static analysis, and has built-in high level concurrent primitives for the rest.
- jmrm 4y agoEven if it's not available (I haven't programmed in Go), I think most of programmers who run parallel code in Go know what is a semaphore or a mutex, don't you think?
- cameronh90 4y agoPerhaps so, but the synchronization primitives leak out eventually, e.g. while profiling or debugging. Semaphores also exist in other contexts, like POSIX/IPC, distributed semaphores etc. Even if you did manage to avoid them entirely, it would suggest a lack of curiosity if you've never looked into how concurrency is implemented beneath the surface.