6 ms·
C or C++ ? Thought about it, at the very least it would make me a bit more well-rounded.
by thatcodingdude 6y ago
C or C++ ? Thought about it, at the very least it would make me a bit more well-rounded.
- fouc 6y agoC is probably better, less abstractions.
- speedgoose 6y agoYou should learn C. Life is too short to struggle with C++ now that we have better alternatives such as Rust. You can also ignore the people who ignore the complexity of web apps. Classic C programs are very often much simpler than full web apps IMHO.
- thatcodingdude 6y agoC it is then. Thanks for your input.
- mucholove 6y agoHappy you chose to learn C. That's exactly what I would recommend. If you are so inclined, I'd look into how to write your own home-grown version of Objective-C—given that valid C is valid Objective-C. Because then you would learn Smalltalk and the whole ladder of it all! Smalltalk is far and away one of the greatest joys on programming. :) http://objective.st http://objective.st The "Gang of Four" explains the patterns in Smalltalk and in terms of entrepreneurship—Patrick Collison's first startup was written in Smalltalk and I think early introduction to it leads to the clean design and success you see coming from Stripe.
- thatcodingdude 6y agoBuilding a language would certainly be a crowning achievement. Thanks !
- criddell 6y agoYou might find it interesting to write some native macOS or Windows software (ie using the native GUI library). If you've mostly focused on web software you might find the different strengths and constraints of truly native code inspiring.
- lenkite 6y agoModern C++ is fairly easy to learn. At-least easier than either Rust or C.
- XCSme 6y agoI personally don't think this is true. I worked a lot with C++ before and I'm still confused by the syntax and logic behind some concepts like (just randomly selecting some links from the dynamic memory group). https://en.cppreference.com/w/cpp/types/remove_extent https://en.cppreference.com/w/cpp/types/remove_extent https://en.cppreference.com/w/cpp/memory/shared_ptr https://en.cppreference.com/w/cpp/memory/shared_ptr https://en.cppreference.com/w/cpp/memory/polymorphic_allocator https://en.cppreference.com/w/cpp/memory/polymorphic_allocat... I think the basics that are similar to other languages (data types, basic pointers, basic references, classes and OOP) are indeed easy to learn as they are basically the same in most programming languages, but the more specific memory management and weird syntax around some standard libraries make it harder to learn, use and read. Let's be hoest, correct C++ code usually looks ugly and verbose.
- lenkite 6y agoshared_ptr is fairly understandable at-least from an application developers usage point of view. std::remove_extent is only used for template metaprogramming and generally in linear algebra libraries. polymorphic_allocator is an expert facility. Apart from shared_ptr, the other two are for very specialised purposes - 99.9999% of all C++ code ever written will never have them. But if you need them, you can leverage them. I came from high level languages (JS/Java) and I found modern C++ pretty good - wow I can code native!. I found writing in plain C very difficult and laborious. I found Rust conceptually far more difficult than C++. Also you can't take your traditional data structures and write them in Rust. You have to do it the special Rust way, which makes it a plain when you are just trying to follow the code/pseudocode in a paper. Admittedly, the Rust compiler catches pretty much everything you do wrong. But I code C++ with all warnings treated as errors along with static code analysers and they catch all my mistakes too.
- AlexCoventry 6y agoI've written 5-line C++ programs which have stumped experts for hours. There's a trilogy of books about all its edge cases and best practices for working around them... C++ still has a place, but not as a beginning systems language.
- dnautics 6y agozig is a fantastic alternative to C. The community is mostly C programmers who are sick and tired of undefined behaviour and #includes in C, but if you let them know you're a webdev looking to learn zig as a first low-level language I think you will find a relatively welcoming community. Undefined Behaviour: Stuff like this - https://twitter.com/jfbastien/status/1280709082626666498 https://twitter.com/jfbastien/status/1280709082626666498