We need (at least) ergonomic, explicit handles

13 points by emschwartz


lcapaldo

This seems right to me, but I am having a hard time imagining what this looks like. Would it maybe be something like a := foo desugars to a = foo.clone() kind of like ? makes things more ergonomic? Or am I missing the idea entirely?

osa1

If you don't want a method call because it too noisy and don't want to make it implicit because that's surprising, then you're left with a new syntax: a prefix or suffix notation.

Is there another option?

Tbh, I think Rust is the best production-ready language that we have today and I've only written Rust outside of work in the past 5+ years (and I write a lot of code outside of work), but these kinds of posts make me wish to leave Rust faster. It's just too low level for what I do and clearly the language won't evolve in a direction that'll help my use case. I've never written a program in my life where I wanted a ref count bump to be an explicit method call, or even a shorter prefix or suffix notation. For me it should be implicit.

In my most recent Rust project I have 493 clone calls (in 16,508 lines of code). Error handling is so painful I deliberately panic on errors, which makes it easy to add throws and gives me stack traces with no dependencies or extra code.

My hope is that I'll finish bootstrapping my language in 6 to 12 months and only use my own language for everything I do outside of work.