3 ms·
> 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 S
by isodev 10mo ago
> 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.
- saagarjha 10mo agoTask and MainActor are types.
- isodev 10mo agoSo?
- jen20 10mo agoSo... they aren't keywords. Swift does indeed have a lot of keywords [1], but neither Task or MainActor are among them. [1]: https://github.com/swiftlang/swift-syntax/blob/main/CodeGeneration/Sources/SyntaxSupport/KeywordSpec.swift#L74-L281 https://github.com/swiftlang/swift-syntax/blob/main/CodeGene...
- isodev 10mo agoI never said they’re keywords. Y’all way too focused on defending Apple at all cost.
- saagarjha 10mo agoReplying to someone talking about keywords with a list of something that's not keywords, then retreating to "you are an Apple bootlicker" when someone points that out, is not a good look.
- dagmx 10mo agoIf you’re including types, you’d hit the many hundreds if not thousands in most languages. It dilutes any point you were trying to make if you don’t actually delineate between what’s a keyword and a type.
- dagmx 10mo agoMost of your listed examples aren’t keywords though. They’re built in types or macro decorators.