by kris-s · 6y ago · 0 comments
That said I know a lot of folks really dig it and think it's a breath of fresh air; more power to em'.
The package manager is a joy to work with and supports multiple versions of tools.
The edition mechanism allows the language not to be dragged down by old cruft.
The proc macros make it possible to have insanely reusable libraries, like serde.
The normal macros are part of the AST so you don't make stupid mistakes that are hard to trace.
Rust is just so good. But I think it's only obvious if you've worked with C++. Most of this doesn't seem special coming from C#. Except the performance that is possible.
The borrow checker might cost you a few minutes, but it can save you days or even weeks of debugging, and maybe it will save lives some day when Rust makes it to safety critical applications.
One thing that did bother me for a long time was RLS auto complete, which was just really slow and useless. This has been fixed with the advent of rust analyzer.
Like, I find it extremely pleasing to write any kind of prototype in Rust and make things work. I guess once you have borrow checker embedded in your head and your newly written code compiles without errors most of the time, it becomes more pleasing, but that's not even the main point. There's something about it that's "just right" for me, not anything in particular but a multitude of various things.
However, this sense is reducing every-time I see an example of some idiomatic Rust code. I appreciate that they've addressed a lot of C++ pain points.
1. Traits are awesome. (Simon Brand: How Rust gets polymorphism right - https://www.youtube.com/watch?v=VSlBhAOLtFA)
2. The lazy pipeline styled programming is idiomatic and produces optimal assembly. (Ranges in C++20 )
3. Extremely powerful enums. Straight out of functional langs.
These are only a few of the things top of my mind but it makes me appreciate Rust more and more.
It's crazy, because this is that part I love the most. Both Rust and Elm just blow my mind every time the compilers not only throw up something I never would've noticed, but even tell me how to fix it! It's crazy to think how far we've come, and it still makes me giddy with excitement every time I see it.
These days I'm working again with Rust to add a new feature to a project after not touching it for months, and that feeling of "oh dear god this is awful" that I felt when I was starting out with the language was back again. However, once everything clicked in, with the compiler telling me exactly what was wrong with the code, and the project compiling which meant that I could be damn sure that the code I wrote would work with little to no risk of breaking in unexpected ways... that sure did spark joy.
Just my experience.
I've never understood this. Why continue taking "awful" puffs? Why not just use/ingest something else that doesn't feel awful?
And yes, I get that languages are extremely subjective and some folks find it joyful not awful. Good for them. I'm glad they found happy. For everyone else though...
I'm primarily a C# dev, which normally has a pretty happy compiler.
But I've started playing with Websharper (Translates C#/F# code to JS.) One nice thing about the library is that once you understand the basics of composition, your JS -will- work as long as the compiler doesn't barf on what you did.
But, it has the drawback of seeing more errors from the compiler itself. While at first it was frustrating, I realized that the time I spent dealing with the compiler errors was still less time than I would have spent troubleshooting my own handwritten JS.
I hope it's not the tone, but rather how nitpicky the language feels, but the target is for most of the seemingly pedantic or arbitrary restrictions to give you guidance on what needs to be done instead.
If I was working on something where the best alternative is C++, I'd probably feel different. Right tool for the job and all of that.
Also a fairly good development experience (compared to C++)
But I find that Go does not spark joy for me. ('.Dial'?!, first character case denotes public/private D:).
I guess that it is very subjective.
Python: https://wiki.python.org/moin/TcpCommunication#CA-b22bc303d6d...
Ruby: https://ruby-doc.org/stdlib-2.5.1/libdoc/socket/rdoc/TCPSock...
Rust: https://doc.rust-lang.org/std/net/struct.TcpStream.html
Julia: https://docs.julialang.org/en/v1/manual/networking-and-strea...
C++: https://github.com/KMakowsky/Socket.cpp/blob/master/Socket.c...
Win32 C: https://docs.microsoft.com/en-us/windows/win32/api/Winsock2/...
Linux C: http://man7.org/linux/man-pages/man2/connect.2.html
Swift: https://github.com/apple/swift-nio/blob/master/Sources/NIOEc...
Java: https://docs.oracle.com/javase/7/docs/api/java/net/Socket.ht...
Javascript: https://gist.github.com/tedmiston/5935757#file-nodejs-tcp-ex...
Anyway, it's not about being demoralised, it just doesn't "spark joy". :)
It might not seem much (and higher level languages usually abstract away the craziness that UNIX sockets are in C), but that's what the OS still gives you in 2020...