Hacker News new | ask | show | jobs
by zelphirkalt 302 days ago
I think I could. But then I would need to put & in front of every argument in every procedure definition and also deal with working with references inside the procedure, with the syntax that brings along.
2 comments

Fair to be annoyed by this, but not very interesting: This is just a minor syntactical pattern that exists for a very good reason.

Syntax is generally the least interesting/important part of languages.

When you pass &variable, I don't think it affects the syntax inside the called function, does it?
Correct. If you then want to subsequently re-reference or dereference that reference (this happens sometimes), you'll need to accordingly `&` or `*` it, but if you're just using it as is, the bare syntactical `name` (whatever it happens to be) already refers to a reference.
Also, Rust does implicit dereferencing, so it's not that much of an issue in practice.