Live data from Hacker News

Rust 1.53

blog.rust-lang.org

61–70 of 98 posts

Re: Rust 1.53

#61
post #9

Should one learn Rust, lets say after 3-4 years, i.e by mid 2020s, once it becomes more mainstream? The syntax of Rust is a mix of OCaml/C++ and I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer, so it takes a lot of cognitive overload to master it. So is it worth learning now or later?

Personally, I'd say it's worth it now. I've been dabbling in Rust for a few years and while I still don't get to use it at $DAYJOB it's been a huge benefit to me. Those "esoteric" concepts have bled into other languages and my usage of them, making me a better programmer overall. Read a chapter of "The Book" once a month or so over the next 3 years and I wager you'll find yourself in a better place than had you waite…

After doing a couple of projects with it, I have found that learning Rust is an exercise in futility. I wish I had never heard of Rust. What will happen is you'll immediately recognize it as the greatest language ever invented and you'll want everyone else to know about it. You will try to convey what it is about Rust that makes all other languages obsolete, but they will look at you like you're a crazy person. You will be ostracized and considered a lunatic. You will lose all your friends. They will say you are part of a cult now and you will eat your lunch at a separate table. You have seen nirvana and will never be satisfied again with doing your old Python or JavaScript job. After doing a few projects in Rust, yet unable to convince your non-programmer managers why they should convert to it, doing your old job no longer brings the joy it once did. You will stop shaving and grow a long beard. Because using non-Rust languages is basically the same as living in the past. The world has lost all its color. The future is Rust, and yet the business world is too conservative, or too afraid, or too incurious to make the leap. This is how I feel about learning Rust right now.

Re: Rust 1.53

#62
post #50

Earlier quoted context omitted.

> For example in my keyboard the micro sign (µ; not to be confused with the Greek small letter mu) The greek letter mu IS the micro sign, where do you think it comes from?

Look the same, but different code points. MICRO SIGN (U+00B5)[1] vs. GREEK SMALL LETTER MU (U+03BC)[2] 1: https://www.fileformat.info/info/unicode/char/00b5/index.htm 2: https://www.fileformat.info/info/unicode/char/03bc/index.htm

My apologies, I did not know about that. Why would they deliberately put duplicates in unicode though?

Re: Rust 1.53

#63
post #29

Earlier quoted context omitted.

> I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer This notion is common among those who are first considering Rust, but also quite overblown in practice. The only thing that reasonably qualifies as "esoteric" in Rust is borrow checking and lifetimes, and these can be mitigated by using very simple idioms/patterns like cloning objects via .clone() or using copy-on-writ…

Disagree - a low level language can’t really mask itself as high level, the abstraction will always leak. Don’t get me wrong, Rust is a really great language and it is a very welcome addition to the for a long time seemingly stagnant low level world, but you won’t be able to refactor logic-related parts “without a thought” on memory layout, even ownership, etc —- something trivially done in high level languages. C++…

It varies widely based on the type of app. Most simple apps using standard lib or a few basic crates/packages/gems/etc can indeed be switched over without too much fuss. But if you're using any large frameworks with a ton of dynamic features that dictate the structure of your application, such as Rails or Django, then it's hopeless, it'll need a complete rewrite with major architectural changes.

Re: Rust 1.53

#64
post #37

Earlier quoted context omitted.

I absolutely agree, this was the line I was arguing with: “You can then code with much the same convenience as e.g. Python, Java or C#”

Ah I see. My personal take is that while Rust introduces some inconveniences not present in those languages, those languages also have plenty of inconveniences that are not present in Rust. From my perspective, enums and traits are so much better than classes as abstractions that most of the productivity lost is already made back.

Rust is a very well designed language no doubt, but I think maintenance is where high level languages have an upper hand in some domains.

Also, there are plenty of high level languages with traits, eg Haskell, but if you prefer one where it is easier to express things optionally with an imperative/OOP mindset, Scala.

Re: Rust 1.53

#65
post #62

Earlier quoted context omitted.

Look the same, but different code points. MICRO SIGN (U+00B5)[1] vs. GREEK SMALL LETTER MU (U+03BC)[2] 1: https://www.fileformat.info/info/unicode/char/00b5/index.htm 2: https://www.fileformat.info/info/unicode/char/03bc/index.htm

My apologies, I did not know about that. Why would they deliberately put duplicates in unicode though?

Some font-families might want these letters to look different for some reason. Even if they look the same perhaps the boldfaced or italics should behave differently, perhaps the spacing should be different etc.

I’m not a font designer but I can imagine that the micro sign often appears around Latin letters whereas the Greek letter mu doesn’t, so that font designers might space them differently for that reason.

For fun I compared 10µm (upper; using the micro sign) with 10μm (lower; using the greek letter mu) in the comic sans font face. https://imgur.com/qwnnAqD

Re: Rust 1.53

#66
post #62

Earlier quoted context omitted.

Look the same, but different code points. MICRO SIGN (U+00B5)[1] vs. GREEK SMALL LETTER MU (U+03BC)[2] 1: https://www.fileformat.info/info/unicode/char/00b5/index.htm 2: https://www.fileformat.info/info/unicode/char/03bc/index.htm

My apologies, I did not know about that. Why would they deliberately put duplicates in unicode though?

> Why would they deliberately put duplicates in unicode though?

IIRC, to enable adoption. Many of the codepoints were adopted from other encoding systems, and it was often useful to support 2-way conversions without loss while Unicode was being adopted.

What's a "duplicate" is also sometimes in the eye of the beholder.

Re: Rust 1.53

#67
post #62

Earlier quoted context omitted.

Look the same, but different code points. MICRO SIGN (U+00B5)[1] vs. GREEK SMALL LETTER MU (U+03BC)[2] 1: https://www.fileformat.info/info/unicode/char/00b5/index.htm 2: https://www.fileformat.info/info/unicode/char/03bc/index.htm

My apologies, I did not know about that. Why would they deliberately put duplicates in unicode though?

[deleted]

Re: Rust 1.53

#68
post #61
post #9

Earlier quoted context omitted.

Personally, I'd say it's worth it now. I've been dabbling in Rust for a few years and while I still don't get to use it at $DAYJOB it's been a huge benefit to me. Those "esoteric" concepts have bled into other languages and my usage of them, making me a better programmer overall. Read a chapter of "The Book" once a month or so over the next 3 years and I wager you'll find yourself in a better place than had you waite…

After doing a couple of projects with it, I have found that learning Rust is an exercise in futility. I wish I had never heard of Rust. What will happen is you'll immediately recognize it as the greatest language ever invented and you'll want everyone else to know about it. You will try to convey what it is about Rust that makes all other languages obsolete, but they will look at you like you're a crazy person. You w…

I can relate, i learned React in tandem with ReasonML. The first job working with TypeScript felt like watching paint dry. Awesome languages can spoil you.

Re: Rust 1.53

#69

Earlier quoted context omitted.

Rust is great as a hobby language, as it tickles some previously unutilized brain patterns. I don't think it's a great replacement for Java/C#. Unless your problem is GC pauses, either language will let you be more productive even when you master the borrow checker simply because their ecosystems are much richer. I can imagine AAA game engines slowly migrating from C++ to Rust, but enterprise applications are already…

> their ecosystems are much richer. The Rust "ecosystem" can seamlessly expand to include any language with a C ABI and FFI. Solutions are also being developed to ease interop with managed platforms like Java/C#. Contrast this with something like Go, where even interoperability with C does not come out-of-the-box and requires compromising the most desirable features in the language itself.

There's no "language to rule them all". Java already tried and almost ruled the world, but reality is that with options languages take here and there to whats important to them, they will never expand to a certain level.

Languages compete in their axes, which for me there are mainly 4 big ones:

a) System/Performance/Control: C, C++, Rust, Zig

b) Application: Java, C#, Swift, Go, Kotlin, Nim

c) Script/Casual: Python, Ruby, Lua, Javascript

d) Domain specific: OCAML, Scheme, Haskell, Matlab

I've never seen a language ruling in two axes at the same time (as in you can use it for the same goals), let alone in all four, or at least three.

The a' axis are very hardcore languages with insane amount of control, but they will never be as productive as the b' and c' axis.

Meanwhile the b' axis is the most popular one, as they allow you to create big and complex application while being productive. Their runtime are not far away from the languages on the a' axis.

The c' axis is most productive and easy to pick up, with languages that feels more natural, but they dont have the performance of the a' and b' axis and also its hard to compose big applications on them unlike the a' and b' axis.

Maybe a successor of languages like Rust and Swift might be the on to do this, but i cant hardly see Rust in that position because programming in it have more or less the kind of productivity that C++ gives you.

I relax much more when i can write something in Swift instead of C++ or Rust for instance, and i would mostly choose it given the perfect match to the problem i'm solving.

I think we are going for a more polyglot world, not less, and i mostly use C++, Swift and Python when i can, where you can replace C++ for Rust, Swift for C# and Python with JavaScript according to your personal tastes.

But using something from one axis trying to reach for the goals better served in another axis is mostly a "when all you have is a hammer.." kind of paradox.

Re: Rust 1.53

#70
post #61
post #9

Earlier quoted context omitted.

Personally, I'd say it's worth it now. I've been dabbling in Rust for a few years and while I still don't get to use it at $DAYJOB it's been a huge benefit to me. Those "esoteric" concepts have bled into other languages and my usage of them, making me a better programmer overall. Read a chapter of "The Book" once a month or so over the next 3 years and I wager you'll find yourself in a better place than had you waite…

After doing a couple of projects with it, I have found that learning Rust is an exercise in futility. I wish I had never heard of Rust. What will happen is you'll immediately recognize it as the greatest language ever invented and you'll want everyone else to know about it. You will try to convey what it is about Rust that makes all other languages obsolete, but they will look at you like you're a crazy person. You w…

This is my life as a Svelte developer.
Post reply on HN