|
|
|
|
|
by eddd-ddde
164 days ago
|
|
I definitely prefer public private over case defined visibility. You can't use an array for different types. Matching _is_ useful, no one uses matching just because it looks "cool". You can have explicit forced AND exhaustive error handling without exceptions. Go actually lacks this. |
|
And I think `public` and `private` keywords are a verbose mess that adds nothing to a language.
> You can't use an array for different types.
Yes I can. I even provided an example for exactly that: `[4]any` can hold references to any type.
> Matching _is_ useful
A lot of things are useful, doesn't mean they are used for that useful case most of the time.
> You can have explicit forced AND exhaustive error handling without exceptions
Go has wrapped and typed errors, covering exactly that.