Re:Switching from C++ to Rust
by unclad5968 on Monday March 13, 2023 @08:55PM
(#35145748)
Well that's obviously not true given all the successful apps written in languages that don't support sum types.
Re:Switching from C++ to Rust
by tialaramex on Monday March 13, 2023 @09:14PM
(#35145956)
It depends what you take "unfit" to mean.
Suppose I say that cars without seatbelts are "unfit" to use on public roads. Clearly I can't mean it's impossible to use such cars, people used to do it all the time, but perhaps I mean it's a bad idea to use them, and that's harder to argue with which is why we got laws saying you need seatbelts.
Re:Switching from C++ to Rust
by andrewflnr on Monday March 13, 2023 @09:49PM
(#35146255)
A lot of successful apps were written with GOTO. That doesn't mean it's a good idea now.
Re:Switching from C++ to Rust
by mikebenfield on Monday March 13, 2023 @09:24PM
(#35146045)
I know your claim will strike some people as absurd, but I agree. I am honestly flabbergasted that any general purpose language created in the last 20 years doesn't have sum types and pattern matching. To me they are very nearly as fundamental as aggregate types (aka structs or product types).
even php has some level of pattern matching now.
Dynamically-typed languages often have adhoc sum types.