News for hackers. Stuff that matters.
Re:My Struggles with Rust by std_throwaway on Sunday May 07, 2017 @12:01PM (#14286070)
How is this problem solved for C++?
Re:My Struggles with Rust by hellofunk on Sunday May 07, 2017 @12:52PM (#14286287)
The nice thing about C++ is that it is so widely used that for just about any task you can find examples of how to do it (usually many different ways to do something), especially for tasks like this article. You will also find plenty of C example, which you could also use in C++.
Re:My Struggles with Rust by arcticbull on Sunday May 07, 2017 @03:04PM (#14286973)
Unfortunately 90% of them will be outdated/wrong/unsafe. Being backward compatible with 30 years of code means you're unlikely to find the right answer for the present. And worse, you won't know it.
Re:My Struggles with Rust by hellofunk on Sunday May 07, 2017 @04:49PM (#14287580)
I think you are spouting a bit of hyperbole. Some might be unsafe but there are more good examples out there than you are willing to admit. And many use modern C++ and demonstrate smart techniques.

If you are not being hyperbolic then please backup your 90% claim.

Re:My Struggles with Rust by lossolo on Sunday May 07, 2017 @03:13PM (#14287009)
You base your 90% claim based on what? I have entirely different experience and I am using C++14 and C. K&R "C programming language" is from 1978 and it's still one of the best books about C still used in 2017. I see many stackoverflow answers updated from C++98 to C++11/14 and some even to C++17.
Re:My Struggles with Rust by kibwen on Sunday May 07, 2017 @04:24PM (#14287434)
As someone whose first introduction to C was through K&R, and still has that torn and tattered copy on his bookshelf, the idea that we're still recommending K&R as "one of the best books about C" only validates arcticbull's (sadly-downvoted) point.
Re:My Struggles with Rust by prewett on Sunday May 07, 2017 @05:05PM (#14287670)
K&R is so clearly written that I was able to understand it as a sixth grader. (At least, I felt like I did; subsequent events later proved that I did not understand pointers, but I don't think it was K&R's fault that a sixth grader didn't understand.) That's why it's still being recommended and the much thicker tomes also purporting to teach the C language have been forgotten. It's probably the same reason that your copy is torn and tattered.
Re:My Struggles with Rust by kibwen on Sunday May 07, 2017 @05:15PM (#14287725)
> It's probably the same reason that your copy is torn and tattered.

Er, well I was also using it as a mousepad for about three years...

Re:My Struggles with Rust by lossolo on Sunday May 07, 2017 @04:48PM (#14287576)
I don't share your opinion and most people I know that do C do not share it also. It's good base to get familiar with language, no one say you can't expand your knowledge further after reading this book.

I've read some other "modern" books about C like "21st century C" but they are not for people that do not know C and they are not so good for people that know it.

Can you provide any arguments to support what you wrote? What alternative you would propose for learning C?

https://www.amazon.com/Programming-Language-Brian-W-Kernigha...

Read what majority of opinions say. It's really easy to criticize without giving better alternative.

Re:My Struggles with Rust by hellofunk on Sunday May 07, 2017 @04:50PM (#14287587)
Keep in mind that I and the parent were mostly discussing C++, a very different language from C.
Re:My Struggles with Rust by pjmlp on Sunday May 07, 2017 @01:20PM (#14286402)
Sadly by what also helped it gain adoption but also hinders the language's safety, copy-paste compatibility with C (to a certain extent).

Meaning that many C++ applications, even nowadays, are actually C compiled with C++ compiler (not even classes are used).

So the transition between skill levels is quite gradual.

For me it is hard to tell, because I know the language since the C++ARM days, which means it had a feature size similar to Object Pascal and actually smaller than Ada.

Back then compiler writers even though it was easier to implement Ada compilers than C++ ones.

So slowly we got used to the new features, being discussed in books or programming magazines.

Re:My Struggles with Rust by bigger_cheese on Sunday May 07, 2017 @07:09PM (#14288211)
This is exactly my experience. My work's internal code which was written in the early 90's basically agrees with everything above. It is C code with a few extra keywords ("new" "delete" and "static_cast"). When I see modern C++ code it looks completely alien to me.
Re:My Struggles with Rust by loeg on Sunday May 07, 2017 @12:58PM (#14286304)
It changes slightly more slowly (written reference books aren't immediately out of date) and there are far more practitioners answering stack overflow questions :-).