Live data from Hacker News

My Rust experience after eight years

codecs.multimedia.cx

1–10 of 55 posts

Re: My Rust experience after eight years

#2
"Of course you can argue that Rust recently adopted language specification, but if you take a second to learn more about it you’ll find out that it comes essentially from outside."

It is worth noting that the Ferrocene specification is made for the certification of the Ferrocene compiler as its sole purpose. It is neither intended nor suitable to implement a compiler based on it.

Re: My Rust experience after eight years

#4
> no dick (or walrus) operator (for me it’s been a good sign that I’m not going to like the language, so far there were no false positives). This means that Go and Nim are out

Not sure where they got that Nim has a walrus operator. Maybe because the syntax resembles Python? That'd make sense.

Re: My Rust experience after eight years

#5

"Of course you can argue that Rust recently adopted language specification, but if you take a second to learn more about it you’ll find out that it comes essentially from outside." It is worth noting that the Ferrocene specification is made for the certification of the Ferrocene compiler as its sole purpose. It is neither intended nor suitable to implement a compiler based on it.

> It is neither intended nor suitable to implement a compiler based on it.

I guess you could make the same argument for C++...

(In case you're wondering, just as an example, you might start implementing garbage collection).

Re: My Rust experience after eight years

#6
> My criteria were subjective but simple to understand: the language should introduce new concepts (as Principia Discordia puts it, ’tis an ill wind that blows no minds) [...]

I wonder how many people share this opinion. I derive as much if not more value from the refinement of existing concepts than the introduction of new ones.

Wanting new concepts just for it's own sake is wild to me.

Re: My Rust experience after eight years

#7
post #4

> no dick (or walrus) operator (for me it’s been a good sign that I’m not going to like the language, so far there were no false positives). This means that Go and Nim are out Not sure where they got that Nim has a walrus operator. Maybe because the syntax resembles Python? That'd make sense.

I was not familiar with the term, so I had to look it up. It's about code like this:

    a := b
the `:=` looks vaguely like a walrus. The most common reference language seems to be Python [1]. The usage is for making assignment remain an expression, so you can do stuff like

    area = (width := get_width()) * (height := get_height())
or something, and have the top-level expression remain valid since the sub-expressions are assignments that remain expressions, i.e. the assigned value is also the result of the expression.

[1]: https://realpython.com/python-walrus-operator/

Re: My Rust experience after eight years

#9
For me lack of language specification is not a problem and it is good that Rust only have one implementation so I don't have a headache to support multiple compilers like C++. The only problems I have with trait is lack of const function and trait upcasting, which just solved by 1.86 that released yesterday. For iterator type mismatched it does not cause much problem since I can create a dedicated generic function to handle that.

The major problem for me with Rust is deadlock. In Rust it is very easy to cause a deadlock compared to other languages. In other languages you need to think a lot before locking a mutex but in Rust you just `foo.lock().unwrap()`, which can easily cause a deadlock if you have multiple mutexes and someone in your team does not aware the lock order.

Re: My Rust experience after eight years

#10

For me lack of language specification is not a problem and it is good that Rust only have one implementation so I don't have a headache to support multiple compilers like C++. The only problems I have with trait is lack of const function and trait upcasting, which just solved by 1.86 that released yesterday. For iterator type mismatched it does not cause much problem since I can create a dedicated generic function to…

Could you create a type around Mutex that enforces the locking order?
Post reply on HN