8 ms·
I like D. I learned all the things in D I could never really understand when I tried to learn about them in C and C++. Things like pointers, structs, unions the
by grawprog 9y ago
I like D. I learned all the things in D I could never really understand when I tried to learn about them in C and C++. Things like pointers, structs, unions the different sizes of types and other things. It's the first language that really made me appreciate why static typing and memory management are useful and why you can do things in a lower level language you can't do in a higher level one. But i also found the syntax fairly easy to pick up, I could never really wrap my head around C++'s weirdness, and my little bit of C knowledge made it fairly easy to begin learning more complicated aspects of the language. I have to admit some parts of it confuse me a bit. I still don't fully understand Templates and ranges but i've used them a little bit and can see why they're useful. I like the dub build system and code repository and definitely prefer imports to #include.
As far as a lack of ide's goes. There isn't many. I like dlang ide. It has everything I need, though it can be kind of buggy. I also don't mind Vim with dlang plugins. But I don't think they can compare to large established ides for other languages.
I can also understand why it doesn't really pick up for large projects the way c++ is.
There isn't much in the way of libraries, there is no tutorials or help aimed towards beginner programmers, which is too bad because I think D is way better for beginners than Java or C, it teaches the same important concepts as both languages while providing a fairly strict compile time checking and a far less ridiculous syntax than java. With the option to not have to learn OOP stuff until you understand basic programming. It also makes it a lot harder to shoot yourself in the face the way C does.
The standard library docs and most other documentation I've seen for D is fairly technical and not very inviting even for non beginners. Most libraries have little to no documentation and many haven't been maintained.
The only real, understandable learning resource I could find is:
http://ddili.org/ders/d.en/ http://ddili.org/ders/d.en/
Which is a great book, but also nearly the only readily available one to learn from.
It is too bad because there are definitely lots of benefits to C++ it's just they're not quite worth the tradeoffs.
- 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.