matdevdug,
@matdevdug@c.im avatar

I am baffled by how much trouble I’m having at writing at a decent clip. I felt pretty good at after a few months, same with and . Meanwhile I’ve been trying to write anything useful in Rust for months and it’s so incredibly slow going.

I’m shocked people are enthusiastic about adopting this for their jobs. If I had a specific part of an app that needed more speed, absolutely. But as a general purpose language? I’m not seeing it yet.

I’ll keep ramming my head against it but have not enjoyed myself thus far. If writing a proof of concept in python takes me 4 hours, rewriting that in rust clocks in easily at 12-16 hours.

faassen,
@faassen@fosstodon.org avatar

@matdevdug
It took me a few years of occasional effort to get proficient at Rust; it's one of the hardest languages I ever learned.

I greatly enjoy it now. I got better at staying on a smooth path most of the time. There's something addicting about making it all fit together. I have confidence in big refactors.

Have I just climbed that hill and now want to convince myself it was worth it? In part, but it also opened many areas of software previously closed, where I need that performance.

faassen,
@faassen@fosstodon.org avatar

@matdevdug
I could write C and C++ already, at least years ago (C++ has changed a lot since then). But Rust gives me confidence and enjoyment where those languages do not. The empowering feeling is in a strange way similar to what I felt at my discovery of Python 25 years ago, but for the low level control high performance domain.

Is Rust a good general purpose language? There's something to say for the tradeoff: more effort to learn but more maintainable architecture and better efficiency.

rimu,
@rimu@mastodon.nzoss.nz avatar

@matdevdug Yup.

If there's any benefits, it's in the greater maintainability, not the initial writing. I don't intend to find out.

tant,

@matdevdug I also came from GC languages (Java, Python, Lua). What helped was learning about Box, Rc, Arc and clone.
Rust wants to be efficient in the default case. So everything is making you share references by default and will trigger the borrow checker. Not like in Python where everything is a Rc ref by default.
So if you want to write code fast you have to use owned values, clone and Rc a lot. Later you can improve for performance when necessary.

jonyoder,
@jonyoder@mstdn.social avatar

@matdevdug is hard. Some programming domains are less-hard than others in Rust. You also trade code-writing speed for correctness -- I'd much rather code slowly to reduce debugging time.

What helped me was that my first couple of Rust projects were smaller, self-written domain-specific libraries that I was porting.

Nowadays, if I want a good speed-difficulty tradeoff, I write .

bluGill,
bluGill avatar

@matdevdug there are tradeoffs. I write #C++ all the time and i'm interested in because I expect to write code faster, without the compromises that make languages like or even go not suitable for my problem (I.work in real time embedded systems). If could possibly work, then your problem isn't one rust really aims to be good for.

carbsrule_en,

@matdevdug that was certainly my experience when I attempted doing Advent of Code last year as a Rust-learning exercise. I'm still thinking of doing a mini Rust project but haven't decided on anything yet - I can recognise that most of my ideas would just be huge time/energy sinks, so haven't taken any of them on 😅
Hope it gets easier soon!

kleaders,
@kleaders@fosstodon.org avatar

@matdevdug Rust really shines in situations where you need both speed and maintainability. If you need to pretty regularly rewrite portions of a code base refactoring is super easy.

Your time estimate feels about right for my experience as well, but where you'll see value is later refactoring.

If you're not likely to refactor or make regular changes, python is definitely going to be more time effective long term. Python really shines with its libraries and speed of writing.

mtomczak,

@matdevdug This is how I feel about c++. I suspect Rust is a great choice if you're writing in a domain where you have to break the memory abstraction, but if you're not, using languages that'll handle it for you is much faster.

Rust is great compared to c++ (and in that problem domain, great relative to languages where auto garbage collection can't be switched off and you can't trust a gc cycle won't run your day or the footprint of having a gc won't make it impossible to run your program on a given hardware target).

maridonkers,

@matdevdug
writing serious, robust and 'production ready' code does take more time (which is regained during maintance phase).

lu3tz,

@matdevdug If you don‘t need rust for your jobs or projects, I‘d say it’s perfectly fine to stop learning it. Especially if you are not interested in the language itself.

I want to learn rust for parts of my software where dev speed is not as important as longevity, execution speed, and correctness. If new features are more valuable maybe another language is just the better fit.

matdevdug,
@matdevdug@c.im avatar

@lu3tz I mostly wanted to learn it because friends have had great results. I’m gonna keep chugging away.

orsinium,
@orsinium@fosstodon.org avatar

@matdevdug I'm reasonably good at but I still don't get why people try to push it as a high level language. Rust is infinitely better than C an C++ but I wouldn't put it as an alternative to or in places where they are a good fit. Rust has some good static safety features, but so it doesn't have some. For instance, the type system in Python or TypeScript is a lot more powerful.

iblancasa,

@matdevdug same here

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Durango
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ngwrru68w68
  • kavyap
  • tacticalgear
  • ethstaker
  • JUstTest
  • InstantRegret
  • Leos
  • normalnudes
  • everett
  • khanakhh
  • osvaldo12
  • cisconetworking
  • modclub
  • anitta
  • tester
  • megavids
  • provamag3
  • lostlight
  • All magazines