The D programming language... is it worth taking my time off my current projects to learn?
I've actually found one independenet game programmer who uses D -- source code included with this halfpipe shooter called Torus Trooper is written entirely in D.
But will this language ever really take off enough to warrant learning it? There aren't even any books on it, and that may be a bit of a handicap in really getting mentally "into" it.
Name:
Anonymous2006-10-09 16:35
Even if I'd like if it did, I don't think it won't get really popular. The author wanting to profit from his work (which is legitimate) is unfortunately incompatible with not being a big corporation full of enterprise business solutions to advertise it in magazines managers read, and the fact there's good, free, popular competition. So learn it as a hobby.
Better yet (unless you'd like a lower level language), learn Python or Ruby if you haven't, and perhaps Lisp (even though I hear learning Lisp feels like having a fetus shoved up your ass, and then having to shit it out while a big bad nigger is trying to shove it back up with his humongous cock. All while the fetus is growing at a steady pace.)
Name:
Anonymous2006-10-09 17:11
Actually I already know LISP. Well, I know it well enough to write a full piece of software if I wanted to, but without exploiting (or knowing about) all the neat and nifty advanced tricks you can do with the language (like macros). The only thing that annoys me about LISP is it's pretty specific to the UNIX world, and code that'll work on one Common LISP interpreter isn't guaranteed to run properly on another Common LISP interpreter. It certainly isn't a language good for platform independent code, believe it or not. Still, I've found it very useful to prototype algorithms on-the-fly, and the benefits of a REPL where you can change code -while it's executing- is like having a constructive dialog, rather than a bitter argument, with my computer.
Although I will probably learn Python next, if not D. Since I'm a heavy Blender user and I could probably do very neat things with it if I knew the language.
Name:
Anonymous2006-10-09 18:06
Python is great, aside from fanboyism. I think you'll find it clean and useful.
Name:
Anonymous2006-10-09 21:21
I think D's a wonderful replacement for C, and a good replacement for C++. It holds huge promise in the system-programming space. I can definitely see it replacing C and C++ for new code in that domain within a decade of it going 1.0.
The whole "profit" angle is misinformed (hi, >>2, stop using double negation everywhere, I have no idea what you're trying to say), because the front-end is free as in speech, and there's a GCC version: http://dgcc.sourceforge.net/ Also, it is getting more popular: http://www.tiobe.com/tpci.htm
However, D is definitely for experienced programmers. If you haven't spent a few years mucking around with C and C++, you're not going to get it easily. The language is still in flux, you'll often find yourself rolling your own bindings to C libs (since nobody else has), and documentation is thin outside of some tutorials and newsgroups.
If you're planning on learning either Python or D, learn Python. Python will let you get things done, today, and maybe even a job (like me, yay). If you're into CG, Python is increasingly common (not just with Blender) in the 3D arena.
BTW, while Python is damn useful, it is not clean, unless you're comparing it to something like Perl or PHP.
By "not clean" you're referring to the similar issues I mentioned in my complaints with LISP?
Name:
Anonymous2006-10-10 3:57
>>5
Heh, sorry for the double negation, it was an edit mistake (changed sign in the last minute and forgot to fix the rest).
As for Python cleanliness (or not), what's making it dirty? The only thing I can think of is __specialnames__.
>>6
No, Python is just as popular in the Windows world as it is in Unix (except the fact Python is usually included and even required in Linux or BSD distros). There's the regular interpreter, Psyco, and even a .NET Python compiler. It still lacks a few modules, and I won't lie by saying they are not important, but overall it's alright. And it's portable. What works in the standard interpreter in one platform must work in another platform, provided you're not using some extension module that's only available for one of them.
Name:
Anonymous2006-10-10 5:11
As for Python cleanliness (or not), what's making it dirty? The only thing I can think of is __specialnames__.
It's a thousand paper cuts. Python doesn't have any glaring flaws, just a number of little ones that have naturally accumulated over time. Syntax noise like __ and """ is just the tip.
Why do we need a parameter for self? Why do we need to pass the class name for super? Why can we omit parens for print but not len? Why is lambda so castrated? Why do we have both lists and tuples? Why immutable strings that sort-of act like lists of characters, but sort-of don't? Why does x += y and x = x + y behave differently? Why is everything supposedly explicit, but class and instance variables so thinly differentiated? Et cetera.
I know most of the above have reasons, and I've heard them all, but that doesn't make it clean. Perl has reasons for everything in there too. Oh well.
Name:
Anonymous2006-10-10 6:11
>>1
Just go and learn it ! It's easy, there's nothing special in D, you have already seen everything somewhere else. And why would you care if it becomes popular or not ?
Name:
Anonymous2006-10-10 9:49
>>8 Why do we need a parameter for self?
Because it's simpler and can be used to automatically convert functions into methods and vice-versa.
Why do we need to pass the class name for super?
Yeah, super sucks.
Why can we omit parens for print but not len?
Because print is a statement and len is a function.
Why is lambda so castrated?
I don't know, I wish I could just do def params: then go on with a regular block, just like you can do function (params) {...} in JavaScript.
Why do we have both lists and tuples?
Beacuse lists are mutable and tuples are not.
Why immutable strings that sort-of act like lists of characters, but sort-of don't?
What's the actual problem with strings?
Why does x += y and x = x + y behave differently?
Because they are different operations; one is accumulation, while the other is actually two: addition and assignment.
Why is everything supposedly explicit, but class and instance variables so thinly differentiated?
Because objects are a namespace hack, and the fact they are makes the language simpler and more flexible. I never saw this as an issue, really...
Name:
Anonymous2006-10-10 19:33
>>9
Well popular isn't really the exact concern I had in mind, but "ample-supported" is. Yeah, the lack of literature sucks. I wouldn't mind if it had at least just 1 book I could have in front of me while coding, it'd be a little more pleasant. Even Lua has a couple of books, and even less people code in it than people who code in D! :3
Name:
82006-10-10 20:07
You missed my point, >>10. I know all that (and said as much), so I don't know why you need to tell me these things again. It's all great and wonderful, yet it doesn't make the language clean.
Let me repeat: everything in Perl has a reason too, but that doesn't make it pretty. Think about it.
Name:
Anonymous2006-10-10 20:12
If you do decide to venture into D land, I'd like to remind you that htod and build are the two most useful utilities ever.
htod in particular you won't be able to live without.
Name:
Anonymous2006-10-11 4:40
>>12 I know all that (and said as much)
Yeah, I read it, but you said it at the end of the post, and I read it after I wrote all that; I felt pity for my poor post and posted it anyways.
Name:
Anonymous2006-10-11 16:25
I'm lovin' it
Name:
Anonymous2006-10-12 12:09
D is a shitty language you can everything in D you can in C or C++, PLUS in C or C++ you have the support and breadth of the C/C++ community.
In the long run this uninteresting and boring language is not worth it.
Name:
Anonymous2006-10-12 16:25
C is a shitty language you can everything in C you can in Assembly, PLUS you have the baddass feeling about it
>>16's translation:
Oh, no, it took me a while to learn C and C++ so don't come with a new language now; I don't care how good is it, it better fail so I don't have to learn it.
Name:
Anonymous2006-10-13 0:15
I guess it'd seem boring if you haven't written much in C or C++, or are just too emotionally involved. Perspective is everything.
Dynamic or functional languages are more interesting, but they belong in different niches.
Name:
Anonymous2006-10-13 2:54
C - works with everything does everything. Not that fun, somewhat annoying.
C++ - works with almost everything. Very gay but works and is often better modularized than C
D - Bits of C & C++ combined into a language which looks like both C and C++ yet lacks the compatibility and tool support to make it truly useful. Doesn't even include interesting or useful features let alone truly support programming in the large.
D is an utter failure and you waste everyone's time talking about. Just shit C++ through a macro pre-processor and you have D. Big fuckin whoop.
If you're emotionally involved and in doubt, follow >>19's example: attack blindly. Sweeping claims and charged language will make it all better.
PS. C++ is a travesty. Enjoy your masochism.
Name:
Anonymous2006-10-13 14:57
>>20
tell us about D's advantages over C++ then. you can't of course.
Name:
Anonymous2006-10-13 15:00
single inheritance and garbage collection => language for babies like Java.
Name:
Anonymous2006-10-13 17:11
Does D support lambda functions?
So many instances I've come across coding in C++ that would have made the code a bit more pleasant-looking where lambda functions would have been appropriate.
I'm very certain it's possible in compiled languages and not just LISP/Python/Ruby type languages. I think Ada, for example, has support for lambda functions.
>>21
Sure I can: it gives me the same power as C++, with less noise, less code, and little need for STL or Boost. Try implementing contracts in C++ for example, or this: http://www-users.mat.uni.torun.pl/~h3r3tic/ctrace/ Everything else is just gravy.
Of course, whatever I may think of D has nothing to do with C++ being a travesty. Either you are blind, or you never read comp.lang.c++.moderated.
If there's one stupid thing about D, it's that it didn't rip off Objective-C's idea of emulating some parts of Smalltalk. Templates, signals & slots, and all the other shitty jazz found in statically-types languages are due this.
Name:
Anonymous2006-10-14 9:07
>>25
and you fail at speed when you write in D. C++ has compilers with optimization, D has nothing. D only has single-inheritance which is useless for some tasks. D only has a closed-source shitty compiler. D fails.
Name:
Anonymous2006-10-14 9:39
Wow, >>30. Setting new lows I see. It has the same backends as gcc (http://dgcc.sourceforge.net/) and dmc, so yes, it has optimization and an open-source compiler.
Uh people use STL because it is statically compiled and thus actually get optimized.
dgcc has fuck all for optimizations.
Lol just because some foaming zealot coded up solutions for the debian shootout questions doesn't make D better. Look why it is rated better than gcc, it is a total fucking joke.
>>33
I'm sorry noob but there is a reason we don't write scientific applications in D but in C++, and a kiddy language shootout won't change my mind about what happens on a cluster of multi-proc machines. D sucks and is not worth it for me, even if the syntax is simpler, it's a very small improvement for all the problems I would have with D.
>>35 You write scientific applications? Sorry, I can't see you doing numerical computation. That's seriously hard shit, the kind of stuff PhDs think about in their spare time. It's not for idiots or trolls.
But just for the sake of argument, what exactly is it about C++ that allows it to work on a multi-proc machine? OpenMP? But OpenMP has bindings in C, so it's trivial to use from D. What about using clusters with MPI or PVM? But both of those have C bindings as well, so they're trivial to use from D too.
Or maybe you're just pretentious prick referring to plain old threads? Whoops, there's this tiny little problem there: http://www.hpl.hp.com/techreports/2004/HPL-2004-209.html Oh shi.. I guess you should have used Erlang. Sorry.
Besides, "real" scientific applications are written in Fortran for the big problems, and MATLAB for the lesser.
Re: Scientific computing. Both of you are total fucking tards. PhDs do not write code, if they do they've basically failed. PhD candidates write code.
Have fun getting D on your cluster, have fun with totally unoptomized DGCC, have fun with a language which can't handle simple recursion problems and have fun trusting benchmarks:
Second, you didn't answer my question regarding STL. If STL is optimized, yet D manages to perform the same, what does that say about D, particularly when the code is shorter? This is simple logic.
Name:
Anonymous2006-10-14 22:11
So you're stupid, you don't know anything at all about scientific programming you don't know how to read a graph or understand benchmarks? You assume shorter is always better (a stupid assumption). You make stupid arguments that 2 tools come up with similar solutions therefore one has to be poorly optimized?
You ignore the fact that D can not match C at all. You rely on a relatively shitty benchmark to argue any of this. You ignore the tool adoption points yet have the gall to ask stupid questions?
You have failed.
Name:
Anonymous2006-10-14 22:25
You ignore the fact that D can not match C at all.
I thought this was D versus C++, but okay, let's talk C. How can D not match C at all?
You rely on a relatively shitty benchmark to argue any of this.
Okay, so tell me upon what basis you claim D's implementations are poor performers then?
You ignore the tool adoption points yet have the gall to ask stupid questions?
Ah...! This is a valid point, my dear troll, but you raised the issue of speed (see >>30). And of course, any library with C headers can be used by D, and any debugger that or tool that can interface with GCC and its metadata can also do the same with D, so... what?
Name:
Anonymous2006-10-15 1:33
both of you are idiots, language doesn't matter, it takes about half an hour to learn a new language if you have any kind of skill. one may be superior, but who cares
Name:
Anonymous2006-10-15 2:08
Half an hour? You must be a very fast reader. Most specs take longer than that to read (unless it's Scheme or Forth).
I have personal benchmarks on real life problems I had.
Considering what your apparent ignorance of the language, I have my doubts. But okay, if you say so.
Just because you suck doesn't mean everyone eles does.
Or maybe I'm realist, not a teenage braggart.
Later.
Name:
Anonymous2006-10-15 9:41
| Considering what your apparent ignorance of the language
How can you judge someone's ability in writing in D or C++ without having seen some of his code? moron.
Name:
Anonymous2006-10-15 9:44
>>48
Engineers have NDA you know? Of course not, you're flipping burgers instead. Keep up the good work though.
So D does have significant performance issues? That's one of the reasons I'm also wary of C#. C# does have nice features, but is not practical for anything other than prototyping or small/medium-small applications (nor was it intended to compete with the performance of C/C++).
How exactly does D have problems with recursion? I'm not exactly an expert on writing compilers but I'm pretty sure recursion has been one of the more trivial and easy things for language designers within these last 3 decades...
Name:
Anonymous2006-10-15 16:32
OP you truly are an idiot. "Not practical for prototyping". Oh come off of it. Practicality for large systems is based on the programmers hardly the language and tools they use. Your knowledge of enterprise computing is obviously really limited if you think CPU bound processes are the big issue.
Name:
Anonymous2006-10-15 18:47
>>54
Last I checked, C# is similar to Java in that the programmer can't decide when memory is freed with explicit new/delete statements, instead relying on an automatic garbage collector to decide the right time -- and often it may be wrong and doing allocs/deallocs at the most time-critical moments. That shit can get very clunky against your will in certain situations no matter how efficient your algorithms are.
I admit I know less about C# than C/C++/Java and even Common LISP. If there's a way to put a tighter leash on the garbage collector to behave as I want it to, I'm all ears.
Name:
Anonymous2006-10-16 0:12
You're talking about enterprise computing and are whining about GC being slow? Have you ever heard of programmers? They are people who work on code. It turns out the most complexity involved in coding the higher chance there is for bugs.
Why are you talking about ENTERPRISE COMPUTING and CPU BOUND PERFORMANCE...
What is with /prog/ you have no fucking clue about context or even real world systems.
I imagine if you want to program the software for the Starship Enterprise it's going to have to be fast enough to make split-second decision calculations for certain situations, but that's just me.
Ever heard of reference counting? I'm sure you have since you claim to know C++ ... modern garbage collection system don't "stop the world" to do garbage collection, they can run in parallel with the rest of program and do generational collection, this is no slower than doing reference counting in a C++ program.
Name:
Anonymous2006-10-16 5:10
>>58
Signed. Signed. Signed. Signed. Signed. Signed. This man knows what he's talking about.
Besides, even if you're stuck with the most primitive type of stop-the-world conservative GC, it's still possible to get controllable performance. How? Simple: only run the GC collection if you: a) allocate to the heap, and b) you're running low on memory, and c) you haven't disabled the GC. Incidentally, D does it like this, which is why it can still perform so well despite a conservative GC.
If you have any experience at all at writing performance code, you are not going to be allocating memory in a performance-critical section. Everyone and their dog knows just how bloody slow malloc is, and so the same rule applies to GC.
Of course, if one wants to rice up an application (and I hope there's a good reason for it other than WOW CFLAGS FAST OMG OPTIMIZED), it's better to have a big buffer pool and take memory from it.
Name:
Anonymous2006-10-16 8:47
>>53
Okay, two things:
a) The one problem the implementations of D definitely do not have is performance.
b) Focusing on performance is going to get you in trouble.
Honestly, if performance is your main concern, and you're coming from a Common Lisp background, you might be better off learning Ocaml. Good performance, more support than D, and more powerful than C++.
That's not to denigate D. I think it's a very promising system language, but it's only for hobbyists at the moment.
Name:
Anonymous2006-10-16 13:29
>>61
Honestly, if he's coming from a Common Lisp background and is concerned with performance, he should learn about (declare (optimize (speed 5) (safety 1))) and explicit fixnum etc. type decls. Though buggered if I can remember the correct syntax.
Name:
Anonymous2006-10-16 19:18
>>57's comment deserved to be appreciated. "Enterprise computing" brilliant. 5 stars.
Name:
Anonymous2006-10-19 14:20
D < Java < C# < C++
Name:
Anonymous2006-10-19 14:29
You guys have to learn that d and c suck and P is teh best
P IS THE BESTZORZ
P IS THE BESTZORZ
P IS THE BESTZORZ
P IS THE BESTZORZ
P IS THE BESTZORZ
P IS THE BESTZORZ
P IS THE BESTZORZ
P IS THE BESTZORZ
P IS THE BESTZORZ
P IS THE BESTZORZ
P IS THE BESTZORZ
D will never be popular because who the fuck wants a language that is almost as ugly and bloated as c++ and has broken OO (no uniform access principle. c++ at least adheres to it by convention), no community, no documentation etc.
It's like c++ without the reasons to use it despite how bad it is.
D is not a good language that is undeservedly unpopular like lisp, smalltalk, scala, eiffel, haskell etc.
D is a horrible kludge of a language like c++ and java that just happens to (fortunately) also not be used by anyone.
>>23
D does support lamdas. Very soon I believe there will be a new syntax allowed that allows them to be even more concise, something like "a -> a + 2".
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy