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.
reply
And now you've lost type checking. `(&'static str, bool, u64, f64)` is not the same as `[4]any`.
> A lot of things are useful, doesn't mean they are used for that useful case most of the time.
I'm sure you have vast insights into what most people do most of the time.
> Go has wrapped and typed errors, covering exactly that.
Sure, "Go has X because it gives you the tools to reimplement it yourself another way" is true of most anything you can think of.
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.