3 ms·
> I think D is way better for beginners than Java or C I love D but tbh I disagree. I think an optimal-ish progression for learning programming languages is:
by earenndil 9y ago
> I think D is way better for beginners than Java or C
I love D but tbh I disagree. I think an optimal-ish progression for learning programming languages is:
Python (basic programming&computer knowledge, algorithms) -> C (low-level knowledge) -> ASM (optional, only if you want to learn extra low level knowledge) -> C++ or Java (to learn modern OOP concepts. D's are a bit too complex and the error messages aren't as good and thus off-putting to a beginner) -> D (amazeballs metaprogramming) -> LISP (amazeballs metaprogramming and FP)
Neither C, D, nor Java should be beginner languages. They're too big and fancy. (To be fair, python does this too, but it does a bit better job of hiding it, and exposes an api that can be leveraged to teach people programming even if they don't understand how it works.)
- grawprog 9y agoOk maybe not beginner. I was thinking more of a second or third language I suppose. I'm mostly self taught other than some BASIC classes in highschool and a bit of R for statistics in university. I never really understood most of the concepts of programming from that. I've tried to learn a bunch of languages on my own. For some reason I tried to start with perl and around the same time C....I wrote a few things but I got stuck on structs with C and well...perl...with perl so I gave up on those. I tried python and couldn't stand it. Tried c++ and D1 and got about as far as I did with C. At the same time I was reading general programming books and looking at lisp and scheme like they used in the books but I just didn't understand them at all...but I sort of understood the idea of functional programming and had understood enough of C to get how cool it was to be able to have fumctions return other functions and the ability to have anonymous functions. In the end I ended up learning lua as my first real language where I finally knew how to use programming to make things. I experimented with a few functional programs in lua and learned enough about OOP and luas metaprogramming to design my own classes and start working on some small games and bigger projects. Eventually I started to run into lua's limitations (every number is a floating point number, the classes I designed couldn't be serialized properly, there wasn't really a way to debug a lua program, lua's tables and metatables are kind of weird) and most of the answers I looked at pointed to needing to understand C and use lua's c bridge to get the kind of functionality I wanted from lua. That was when I rediscovered D and all the things that confused me about it before just made sense this time. I have been also trying to learn C along side it just because it seems like it's something I should know. But I've been writing most of my stuff in D lately, even smaller programs just because I find it has the balance between lower level and higher level stuff I need and can use for what I know.
- pjmlp 9y agoC should never be learned on the path of being a good, programming safe conscious C++ programmer. CppCon 2015: Kate Gregory “Stop Teaching C" https://www.youtube.com/watch?v=YnWhqhNdYyk https://www.youtube.com/watch?v=YnWhqhNdYyk
- earenndil 9y agoC should ALWAYS be learned on the path of being a good, programming safe conscious programmer of ANY language. Otherwise you will not understand the underlying machine.
- pjmlp 9y agoC is not the only way to understand the underlying machine, plenty of languages offer similar features. Plus being a subset of C++, there is hardly any value in learning C as such, instead of good C++ idioms. In fact, my university already in the mid-90's never teached C, only C++ with a professor that was insightfull to have its own set of type safe abstractions, the usual array/string/containers set, while teaching us about RAII, years before C++98 and STL were a standard. There were system programming assignments in C, it was expected that any student would be able to think and know how to apply C++'s C subset for the assignment.
- earenndil 9y ago> Plus being a subset of C++, there is hardly any value in learning C as such, instead of good C++ idioms To say this is to miss the point entirely. A machine runs not C++, but C. To learn how to use, e.g., std::vector (to cite a random example) is to learn a high-level programming concept which could be learned in any language but not to learn how the machine works. To learn how to use a char* in c++ is a complete waste and not different from learning how to use a char* in c.
- pjmlp 9y agoNo, you are the one missing the point. CPUs don't run C, and unless we are speaking about a PDP-11, the ANSI C abstract machine surely doesn't expose how this mobile phone CPU/GPGPU works. When I want people to actually know how computers work, I teach them Assembly. C isn't a special snowflake in the realm of systems programming languages, there are plenty of languages, some even older than C with the same low level capabilities. Had AT&T been allowed to sell UNIX at the same price the as other OS vendors were selling their products instead of giving it almost for free to US universities, we wouldn't be talking about C nowadays, and probably also not about C++.