logoalt Hacker News

isodevlast Tuesday at 4:07 PM2 repliesview on HN

> Do people actually believe that there are too many keywords?

Yes they do. Just imagine seeing the following in a single file/function: Sendable, @unchecked Sendable, @Sendable, sending, and nonsending, @conccurent, async, @escaping, weak, Task, MainActor.

For comparison, Rust has 59 keywords in total. Swift has 203 (?!), Elixir has 15, Go has 25, Python has 38.

> You can still used gcd.

Not if you want to use anything of concurrency, because they're not made to work together.


Replies

dagmxlast Tuesday at 5:01 PM

Most of your listed examples aren’t keywords though. They’re built in types or macro decorators.

saagarjhalast Tuesday at 4:23 PM

Task and MainActor are types.

show 1 reply