top | item 42269252

(no title)

whatyesaid | 1 year ago

Rust is slow to develop and prototype in. It's good if you're a big company not the average Joe.

We need a better C++ ("systems") base language that could have an optional borrow checker or bounded model checker enabled.

discuss

order

rtpg|1 year ago

Is C++ easier to prototype in? Of course there's the borrow checker, but I feel like Rust at least shows up with some expressiveness niceties that gets you some productivity wins in the prototyping stage.

Though really I suppose "comfort with a language " is such a big factor, seeing people really belt out stuff in C is always a bit impressive to me (yeah yeah, bug filled etc)

actionfromafar|1 year ago

C forces me to do the barest minimum and avoid prematurely astronaut architect everything. That often makes it faster to prototype in. Not because I can do more. But because I have to reframe the problem so it fits.

But large codebases in C are tedious to work with and slow to refactor.

catlifeonmars|1 year ago

> Is C++ easier to prototype in?

Maybe if you’ve already got the toolchain set up and boilerplate templates etc.

AlotOfReading|1 year ago

Isn't that just D? No one uses D not because it's a bad language, but because the actual language isn't nearly as important for adoption as the community behind it.

devnullbrain|1 year ago

If the borrow checker slows you down, the C++ you write instead would just be buggy

etyp|1 year ago

Safe programs extend beyond those that Rust's borrow checker accepts though. There is more than one way to make a program safe, not all of them would be valid Rust.

tylersmith|1 year ago

[deleted]

redman25|1 year ago

Rust isn’t too bad if you throw clones everywhere. Otherwise, you might as well use a garbage collected language.

Philpax|1 year ago

If it's optional, people are unlikely to use it, and we'll be back at square one again regarding pervasive memory safety issues.

That being said, keep an eye on Carbon.

dralley|1 year ago

Prototype, sure.

Develop? Debatable. At a certain scale of project, all the static guarantees become quite helpful. And a "prototype" written in Rust is often much closer to production-ready than you might think. Rust makes it easier to see which corners you've been cutting than most languages.

stephen_g|1 year ago

Apple is positioning Swift as this (and are also moving it from Apple's space on Github etc. into its own and gradually trying to build more of a community), so I wonder if it will catch on more. If people are already using it in the app space, it might be able to branch out into other areas.

Over the last year and a bit they've also been working on strong C++ interop to be able to start using it in their own projects without having to do rewrites, and also better cross-platform and static linking support on Linux which could all make it a lot more attractive.

(For context, like Rust, Swift is both memory safe and data-race safe)

n144q|1 year ago

Swift uses garbage collection (I know, arc, but that's still garbage collection), so it more or less is in the same category as Go. And I don't see people choosing Swift over Go any time soon.

C++ and Rust are a different thing.

linhns|1 year ago

> We need a better C++ ("systems") base language that could have an optional borrow checker or bounded model checker enabled.

Are you describing Rust?