Live data from Hacker News

Monads and GATs in Nightly Rust

fpcomplete.com

1–10 of 176 posts

Re: Monads and GATs in Nightly Rust

#4
post #2

Side question : Is there any example of a language that has successfully added HKT after it was released and became popular ?

Would you consider Scala? It wasn't wildly popular before 2.8 (which is when HKTs were added) but not unpopular either.

Re: Monads and GATs in Nightly Rust

#5
post #2

Side question : Is there any example of a language that has successfully added HKT after it was released and became popular ?

C++ did during the standardization to C++98 with template template parameters.

C++ before 1998 was a very popular language, maybe even more popular relatively than it is now.

Re: Monads and GATs in Nightly Rust

#6
It seems that Rust just keeps getting more and more features.

Do people generally feel like the more features the better the language? I'm personally of the opinion that less is more.

Is this a pain point at the moment for Rust devs? Do you feel like the code you write is the same code 99% of other Rust developers would write to solve the same problem? Or is there actually a really large variety of styles?

Re: Monads and GATs in Nightly Rust

#7

It seems that Rust just keeps getting more and more features. Do people generally feel like the more features the better the language? I'm personally of the opinion that less is more. Is this a pain point at the moment for Rust devs? Do you feel like the code you write is the same code 99% of other Rust developers would write to solve the same problem? Or is there actually a really large variety of styles?

I'm not sure you can only see this in the light of 'more features'. From a more fundamental perspective GATs just lift a restriction.

Rust already has generics and Rust already has associated types. Previously you needed to know/remember those features cannot interact for some reason, now they can. To me this is in a sense 'less' and not 'more'.

So, a matter of perspective I guess.

Re: Monads and GATs in Nightly Rust

#8

It seems that Rust just keeps getting more and more features. Do people generally feel like the more features the better the language? I'm personally of the opinion that less is more. Is this a pain point at the moment for Rust devs? Do you feel like the code you write is the same code 99% of other Rust developers would write to solve the same problem? Or is there actually a really large variety of styles?

I would say, with the exception of the async split, no. The biggest pain is still the learning/skill curve, it always feels (to me) like there's a language feature I'm not taking advantage of that would make a piece of code more "rusty". Not different in style necessarily, just more elegant.

Re: Monads and GATs in Nightly Rust

#9

It seems that Rust just keeps getting more and more features. Do people generally feel like the more features the better the language? I'm personally of the opinion that less is more. Is this a pain point at the moment for Rust devs? Do you feel like the code you write is the same code 99% of other Rust developers would write to solve the same problem? Or is there actually a really large variety of styles?

GATs are removing some restrictions on the existing facilities of traits, and less creating totally new features. To be clear figuring out the subtleties of exactly how this is verified and edge cases with the type system is non-trivial, but as a developer this extends the set of types that “just work” as associated types. Crucially, it allows avoiding some weird hacks to get the borrow checker happy with non-static lifetime associated types in many situations.

Re: Monads and GATs in Nightly Rust

#10
post #7

It seems that Rust just keeps getting more and more features. Do people generally feel like the more features the better the language? I'm personally of the opinion that less is more. Is this a pain point at the moment for Rust devs? Do you feel like the code you write is the same code 99% of other Rust developers would write to solve the same problem? Or is there actually a really large variety of styles?

I'm not sure you can only see this in the light of 'more features'. From a more fundamental perspective GATs just lift a restriction. Rust already has generics and Rust already has associated types. Previously you needed to know/remember those features cannot interact for some reason, now they can. To me this is in a sense 'less' and not 'more'. So, a matter of perspective I guess.

Ah okay, that makes sense. Thanks
Post reply on HN