This confirms my concerns.. Rust is becoming a Scala language, too much features.. Rust should have been as simple as C, i wonder if there will be some compiler switchs to ban certain features, and crates that are tagged to work with certain features, so at least things will be easier to deal with
You do know you don't have to use everything under the sun. If you want to use a sub set then use the sub set.
Monads and GATs in Nightly Rust
81–90 of 176 posts
Re: Monads and GATs in Nightly Rust
#82Earlier quoted context omitted.
"Yes, more features make a better language" At the pace of what Rust is adding feature, it's the next C++ in the next 5-10years.
The pace has already slowed down significantly, and will continue to do so. The RFC for GATs was opened in 2016. It's still not clear when this is hitting stable Rust yet.
Everything else seems to be on the order of small polish to the language (trailing commas), standard library expansion, and in some cases language restrictions to make rust fit better with embedded systems.
In many ways, Java is seeing more major changes than rust is.
Re: Monads and GATs in Nightly Rust
#83Earlier quoted context omitted.
I agree its doing great for now. This new addition just feels like a minor cause for concern though. Time will tell how things play out and which faction wins - those who actually build shit or architecture astronauts making towers of monads.
Your claims are at odds with each other. If the people who are passionate about a language are the ones who pursue its advanced features (and therefore somehow force them on the rest of the world), who then is left to "actually build shit"? Why, if simple functionality is such a strong requirement of productivity, aren't those who stick to simple features productive enough to maintain an ecosystem without the Archite…
Some people are passionate about the language itself, and programming language theory in general. Others are passionate about solving whatever particular problem their project solves.
A simple thought experiment - think about the most widely used libraries and tools across the whole developer ecosystem. How many are built in Haskell? I count maybe one, Pandoc. How many are built in terrible code bases and languages but chug along anyways? I count thousands. How many wildly successful companies have pristine code bases and how many have trash fire code bases that chug along anyways?
Re: Monads and GATs in Nightly Rust
#84It 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?
> Is this a pain point at the moment for Rust devs? No, in rust as long as you don't use a feature you don't need to know about it. > Or is there actually a really large variety of styles? There are official(-ish?) style guidelines. So while there are a variety of styles most code uses mostly the same style. > I'm personally of the opinion that less is more. Sure, but you normally want to have a "complete well rounde…
Is that not the same in C++ and in most languages?
... until someone else in your team uses it in your code base. And then you need to know about it in Rust as well.
Re: Monads and GATs in Nightly Rust
#85Earlier quoted context omitted.
The F in FP definitely hugely benefits from GC. Closures in Rust don't compare to Haskell. Combine that with GHC's optimizer and it's no contest which language to choose if both ergonomics and performance of code written largely as lambdas is your priority.
With linear types you could get rid of the GC, probably.
It's not so much the GC, as it is "in a GC'd language, everything is on the heap and a lot of information (from Rust's perspective) is erased." You may be able to get rid of GC in some sense, but you'd end up with something halfway to Rust, not the whole way.
Re: Monads and GATs in Nightly Rust
#86It 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?
> Is this a pain point at the moment for Rust devs? No, in rust as long as you don't use a feature you don't need to know about it. > Or is there actually a really large variety of styles? There are official(-ish?) style guidelines. So while there are a variety of styles most code uses mostly the same style. > I'm personally of the opinion that less is more. Sure, but you normally want to have a "complete well rounde…
I don't think that's a particularly good argument, since it's true for all languages. Even if you don't use a feature, you will use and read code written by others all the time and understanding that code can be pretty important.
Re: Monads and GATs in Nightly Rust
#87GAT = Generic Associated Type
Thank you. I spent 10 minutes fruitlessly googling to no avail. A simple rule: if you're writing for a more general audience, always spell out your initializations the first time you say them.
Re: Monads and GATs in Nightly Rust
#88This confirms my concerns.. Rust is becoming a Scala language, too much features.. Rust should have been as simple as C, i wonder if there will be some compiler switchs to ban certain features, and crates that are tagged to work with certain features, so at least things will be easier to deal with
You do know you don't have to use everything under the sun. If you want to use a sub set then use the sub set.
The team aspect alone is a deal breaker for me--when you have a technology that attracts people who are intrinsically interested in the technology, good luck trying to get them to avoid certain parts of it. That's a losing battle.
Re: Monads and GATs in Nightly Rust
#89Earlier quoted context omitted.
GAT limited to lifetimes would already be good enough for me. What I need is something similar to: trait AsyncCallback { type Input : 'a; type Output : Future + 'a fn call (self, Self::Input ) -> Self::Output ; }
Lifetimes are already generics, so it is harder to add "lifetime only GATs" than it is GATs, in my understanding.
But besides that the amount work is indeed very close by each other. Which is why there is currently no plan to first have lifetime only GATs stable as far as I know.
Re: Monads and GATs in Nightly Rust
#90Earlier quoted context omitted.
Lifetimes are already generics, so it is harder to add "lifetime only GATs" than it is GATs, in my understanding.
Lifetimes do not influence code generation (besides potential specialization on 'static, which I'm not sure if it's a thing). But besides that the amount work is indeed very close by each other. Which is why there is currently no plan to first have lifetime only GATs stable as far as I know.
You cannot specialize on lifetimes, it is not sound.