News for hackers. Stuff that matters.
Re:Ask HN: Why do you use Rust, when D is available? by billconan on Friday June 12, 2020 @10:03AM (#23499315)
I got scared away by rust's syntax.

I feel that people can learn rust faster if they know c++ beforehand.

c++'s syntax is scary too. But there are different levels of c++. You don't need to use the scary part to make things work.

Re:Ask HN: Why do you use Rust, when D is available? by cyberprunes on Friday June 12, 2020 @10:46AM (#23499737)
Disagree. Sure rust has a notable syntax tax (not what it used to be) but that's the easy part! It's the concepts and mindset that are the biggest hurdle in Rust. Going to C++ first won't help you there. If you already know it, great but Rust is a different language and you'll spend a lot time trying to transfer C++isms over until you realize writing effective Rust is not like writing effective C++ and you go through a process of unlearning. In my view, learning C++ for the purpose of learning Rust is massive waste of time.
Re:Ask HN: Why do you use Rust, when D is available? by peterkos on Friday June 12, 2020 @02:12PM (#23501986)
> Rust is a different language and you'll spend a lot time trying to transfer C++isms over until you realize writing effective Rust is not like writing effective C++ and you go through a process of unlearning

Ding ding ding! However I do think that the combination of syntax with the brand new concepts just adds that extra layer of complexity. A similar thing is Optionals in Swift -- the syntax is so baked into the language that even if you really understand how optionals work, the syntactic sugar keeps piling up in different situations. (i.e., first the ? operator, then implicitly unwrapped optionals, then if lets, guards, guard lets...)

Re:Ask HN: Why do you use Rust, when D is available? by kd5bjo on Friday June 12, 2020 @10:49AM (#23499763)
> I got scared away by rust’s syntax.

I’m curious about what you find scary about Rust’s syntax. I always found it to be a fairly natural extension of the syntax from C and other ALGOL-derived languages.

Its semantics, on the other hand, took quite a while to wrap my head around. I am reasonably productive in Rust these days, and I still sometimes can’t predict whether or not the compiler will allow something.

Re:Ask HN: Why do you use Rust, when D is available? by peterkos on Friday June 12, 2020 @02:10PM (#23501968)
As a Rust newbie: macros, lifetimes, and (when I really first started), closures. All of that syntax just seemed so messy to me.

The borrowing model was actually my favorite part because it not only was interesting, but made sense! And the syntax was relatively clean :)

Re:Ask HN: Why do you use Rust, when D is available? by Avamander on Friday June 12, 2020 @10:01PM (#23506059)
No, knowing C++ probably confuses you for a while, it has confused me.