2 ms·
> I think, first of all, that for a programming language to be effective, everything needs to be opt-in, right? I disagree. You gain a lot by making things not
by jbandela1 3y ago
> I think, first of all, that for a programming language to be effective, everything needs to be opt-in, right?
I disagree. You gain a lot by making things not-opt in. For example, strong typing. Strong typing really becomes powerful when everybody uses it. Another example, is purity and side effects. Purity isn’t really optional in Haskell.
Which brings another point: you could say that for side effects in Haskell, you don’t pay as you go, everyone has to pay all the time. You are basically forced to deal with the concepts of monads fairly if you want to write anything interesting.
Just like Haskell gets a lot of value in using the type system to encode side effects, Rust gets a lot of value in using the type system to encode ownership. Further, I would argue that the borrow checker provides value beyond memory usage, since a clear ownership model can have follow on effects for correctness and program organization.
- HKH2 3y ago> you could say that for side effects in Haskell, you don’t pay as you go, everyone has to pay all the time. That's exactly why I hated doing IO in Haskell. All the math concepts are overhead too.