Earlier quoted context omitted.
I rather use compiled managed languages like Swift, D and C# instead, they provide enough low level coding knobs for C and C++ style coding, while being high level productive. Would add Go to the list, but only when I really have to. Nim and Crystal could be alternatives, but don't seem to have big enough communities, at least for what I do. However I do agree with the conclusion, Rust is a great language for scenari…
C# is underrated by the HN crowd, I find. I quite like how mid sized firms (100-1000 employees) use it.
Was Rust Worth It?
361–370 of 736 posts
Re: Was Rust Worth It?
#362Perhaps my biggest critique is that crates.io has no namespacing. Anyone can just claim a global and generic package name and we mostly have to deal with it (unless you avoid using the crates.io repository, but then you'll probably have more problems...). Some of these globally-claimed generic packages are not really the best package to use. Maybe it was a reaction against the Java-style reverse DNS notation, which i…
I don't think a lack of namespace is that much problem. Sure, it is often annoying, but people are creative enough to create a short enough and still available crate name for most cases. Namespacing only makes sense for a large group of related crates---and it wouldn't give much benefit over a flat namespace. As other mentioned though, a typosquatting is a much bigger problem and namespacing offers only a partial sol…
Re: Was Rust Worth It?
#363Earlier quoted context omitted.
What's a frequently encountered case for such cyclic loops? Without details I'm drawn to trying to break the cycle, either by promoting the shared state to a container object for the set, or by breaking it out into it's own object that multiple things can point at.
ASTs
I've still been meaning to write something in / learn Rust's ways of thinking; is there not an intended replacement for these data structures? Or do they expect it all to go under Unsafe?
Re: Was Rust Worth It?
#364I wrote a lot of rust, but after some years it still feels unproductive. I do a lot of zig now and I am like 10 times more productive with it. I can just concentrate on what I want to code and I never have to wonder what tool or what library to use. I know rust gives memory safety and how important that is, but the ergonomic is really bad. Every time I write some rust I feel limited. I always have to search libraries…
Re: Was Rust Worth It?
#365Earlier quoted context omitted.
> Give me rusty bash. Bash with types (especially floats), fewer edge cases, functions with explicit parameters, simple command line flags...
Now you have me curious - where do you see the need for floats in shell? You are more creative than myself, because I am struggling to come up with a situation where I would lean on this. A "path" type would be by far more useful to my work.
I guess I could avoid floats using multiplication, but I would rather keep the code as simple as possible.
Re: Was Rust Worth It?
#366Earlier quoted context omitted.
I rather use compiled managed languages like Swift, D and C# instead, they provide enough low level coding knobs for C and C++ style coding, while being high level productive. Would add Go to the list, but only when I really have to. Nim and Crystal could be alternatives, but don't seem to have big enough communities, at least for what I do. However I do agree with the conclusion, Rust is a great language for scenari…
C# is underrated by the HN crowd, I find. I quite like how mid sized firms (100-1000 employees) use it.
1) Modern Java is almost as good as C# with some things I can't give up in Java (static imports => succint code, Groovy Spock => succint tests)
2) Kotlin is better than C#
3) JVM has much much bigger ecosystem (almost all the apache projects are JVM oriented) and default web framework is much less code to type (SpringBoot) is much more productiv
4) JVM has wider variety of langs
For those reasons IMHO if you are small-mid company (or startup) it's wiser to choose JVM.
Re: Was Rust Worth It?
#367Earlier quoted context omitted.
I tried to get into rust for many years, I'm now in a C/CPP job (after Java/Python/Ruby and other gigs). What I've come to understand is that Rust's lifetime model is very difficult to work with whenever you have a cyclic reference. In C/CPP the same holds, but you deal with it through clever coding - or ignoring the problem and cleaning up memory later. Java, and other GC'd languages just work for these structures.…
> I just wish Rust learning resources would be more upfront about this. While beginner resources don't dwell too much upon cyclic references, they don't consider unsafe blocks as unusual. All the material I've seen say that there are certain domains where Rust's compile-time safety model simply won't work. What Rust allows you to do instead, is to limit the scope of unsafe blocks. However, the beginner material often…
Indeed. Starting out with code sprinkled with Rc, Weak, RefCell, etc is perfectly fine and performance will probably not be worse than in any other safe languages. And if you do this, Rust is pretty close to those languages in ease of use for what are otherwise complex topics in Rust.
A good reference for different approaches is Learn Rust With Entirely Too Many Linked Lists https://rust-unofficial.github.io/too-many-lists/
Re: Was Rust Worth It?
#368Earlier quoted context omitted.
80% of crates have no unsafe code in them.
I'm interested in what went into this number. I checked the six most recently published crates on crates.io (blablabla, nutp, tord, g2d, testpublishtesttest, hellochi, at the time of writing). Three of those (blablabla, testpublishtesttest, and hellochi) did some variation on printing `hello world`. g2d seems like an interesting graphics library. tord provides a data structure for transitive relations, which is also…
Re: Was Rust Worth It?
#369I wrote a lot of rust, but after some years it still feels unproductive. I do a lot of zig now and I am like 10 times more productive with it. I can just concentrate on what I want to code and I never have to wonder what tool or what library to use. I know rust gives memory safety and how important that is, but the ergonomic is really bad. Every time I write some rust I feel limited. I always have to search libraries…
Wait, I am a bit confused. Does Zig have more/better libraries than Rust? I thought it's a pretty new language. The most limiting thing for me with Rust was the lack of libraries (vs. say Python or Node/JavaScript).
Re: Was Rust Worth It?
#370Earlier quoted context omitted.
> Literally nobody has said this. I know of a few people, personally, who have said this.
Ok, but like, were any of them people of note, actively working on the project? Because it seems like the people who are working on the project aren’t saying that.