6 ms·
Programming in D
- stesch 13y agoNot easily recognizable if it's about D1 or D2.
- WalterBright 13y agoIt's D2.
- avargas 13y agoI was just reading a bit of the book and stumbled upon this. http://ddili.org/ders/d.en/hello_world.html http://ddili.org/ders/d.en/hello_world.html "Do not install a D1 compiler. This book covers only D version two."
- deleted 13y ago[deleted]
- human_error 13y agoI'm interested in D but lack of tutorials/documentation have always kept me away from it. It'd be cool if it had something similar to Python's tutorial.
- WalterBright 13y agoAli's book fills that gap.
- juanManuel 13y agoThe D Documentation exists also in CHM form thanks to CyberShadow (I recommend reading it with ChmSee if you are a linux user): http://thecybershadow.net/d/docs/ http://thecybershadow.net/d/docs/d2.chm
- samuell 13y agoSweet! What a blast to browse this in a native app! :) Page flipping, keyword searching ... everything happens immediately. Byebye Web browsing. Just do it: sudo apt-get install chmsee wget http://thecybershadow.net/d/docs/d2.chm chmsee d2.chm &
- dnesteruk 13y agoD is great but lack of tool support (proper intellisense) means we're all stabbing in the dark trying to figure out what function to use, where it comes from and what its parameters are supposed to take. Also, really needs declarative parallelization mechanisms a la OpenMP. Plus, unsure if compiler supports vectorization, SIMD support would be nice to get. On the other hand, amazingly fast compiler, very concise language, and metaprogramming! Want a decent IDE!
- rukantos 13y agoD already has decent IDE. -Visual D (VS Add In) -DDT (Eclipse Add In) -Mono-D (Mono-Develop Add In) I recommend you use Mono-D or Visual D. and, D has great parallelism and SIMD support in standard library. http://dlang.org/phobos/std_parallelism.html http://dlang.org/phobos/std_parallelism.html http://dlang.org/phobos/core_simd.html http://dlang.org/phobos/core_simd.html Let's try!
- ch_123 13y ago"D is great but lack of tool support (proper intellisense) means we're all stabbing in the dark trying to figure out what function to use, where it comes from and what its parameters are supposed to take." Some people like to read the documentation and not let their editor figure out how to program for them.
- anon1385 13y agoWasting time just to enhance your own ego is not a virtue. If you really find that pseudo-religious penance is beneficial to your smug sense of superiority then wear a hairshirt while you program.
- sanderjd 13y agoBah - the point is not that it is better to look things up than to have an IDE know things for you, the point is that if your IDE doesn't know those things, you should be able to find them yourself. It is bad to be beholden to intellisense to the point where you actually can't use a language that it doesn't work well for.
- steveklabnik 13y agoD is a fun language, and some friends and I (mostly my friends) have been/were writing an exokernel in it[1], but between the weird licensing, D1 -> D2 transition, dual standard libraries, and a few other things, it's been really rocky. I hear it's a bit better these days, but my "better C++" interests lie in Rust nowadays. That said, this link is one of the ways D is strictly better: since it's been around a while, there's more educational information out there. 1: https://github.com/xomboverlord/xomb https://github.com/xomboverlord/xomb
- nja 13y agoDo you think you can go into more detail on what you've found to be better in D vs Rust?
- steveklabnik 13y agoMy D is rusty by now (ha!), but one thing is how different their macro system is. The biggest thing that D is better at is having been around for a much longer time. There's way more docs and users.
- 0b1100110 13y agoI find D to be much less complex than Rust. Rust, even now, is woefully incomplete. Take the 'rust' tool for instance, see how many bugs you can find just in the flags that you can pass to it! (it's a substantial amount... or it just decides to break conventions, which dmd did also with it's '-offilename' type flags.) Rust is also harder to learn, and it seems (to me) to also be more difficult to use C libraries from Rust than D. I cut my teeth on D by creating a few bindings, and I really struggle to do the same in Rust. Just my experiences... PS - Rereading this it occurs to me that D is probably just as complex as Rust, but it 'feels' less complex due to syntax familiarity.
- WalterBright 13y agoThe dual library thing was resolved several years ago. There's also a fully GPL licensed version (GDC).
- thepumpkin1979 13y agoThank you. I'm actually watching Ali's Session of DCONF 2013 and was wondering where this book was. I totally recommend watching the sessions: http://www.youtube.com/watch?v=mPr2UspS0fE http://www.youtube.com/watch?v=mPr2UspS0fE
- mitchi 13y agoI wonder if they are being deliberately slow at releasing these videos so that each one gets discussion and views. The conference has been over for some time now.
- thepumpkin1979 13y agoSame here. Although, it may be lack of time too. It's a shame, I'd like to watch "Shared Libraries with D".
- digisign 13y agoI've been thinking about learning Go this summer, but this article just reminded me about D. Anone have any insights re the two?
- beatgammit 13y agoI use Go actively, and I come back every few months to D. In short, use Go if you want a simple, structure development environment, but use D if you want a better C++. I like Go because it's well designed, but I like D because everytime I review the docs, I learn something new. Here's some very basic analysis: Go is fantastinc for writing servers. The concurrency model is awesome and the standard library is surprisingly extensive given its age. It does work for non-server things, but it was developed for making concurrency as used in servers easier. There is no manual memory management, unless you use a C extension. Pain points: * no inheritence: it's fine for 90% of problems, but really annoying for the last 10% * super-strict type system: byte isn't implicitly convertable to int, for example * opinionated: code style, build system, etc.; everything can be worked around, but it's a recurring theme * no manual memory management: the GC is getting better, but it'll never be good enough for writing intense games D is awesome for writing more general software. The general feel is what C++ would have been if it was designed better. It has a stronger connection to C, so manual memory management is an option with free/malloc. However, most of the time you'd rely on the GC, but it's nice when you absolutely have to control things, e.g. for a game. Pain points: * not enough documentation: the website is awesome, but when you try to do something complicated (like write a game), it's uncharted territory * Annoying bugs, especially in CTFE: most normal operations work fine, so this isn't really an issue * no package manager: well, there is DSSS and Orbit, but I haven't found one that I like * no standard http lib: terrible if you want to do web-stuff I actually recommend them both. They're very different languages built for very different things, but you can't go wrong with either. Go 1.1 is about to be released (the "final" release candidate was released last week), and it has some cool new features (I like method values a lot). Then again, D has awesome metaprogramming support (templates are magic =D).
- personak 13y agoFor D, vibe.d is great for web development, and it comes with a package manager: http://vibed.org/ http://vibed.org/ http://registry.vibed.org/ http://registry.vibed.org/