D language

Pages: 123
3. The community really has a Java feel to it. They often don't care as much for efficiency as say a C++ programmer would.


I have a pretty solid background in both C and Java, and I've been involved in the D community for several years now. My impression is very different. Performance is a major topic in the newsgroups. I think that those who use D on a regular basis accept the fact that things aren't quite yet where we'd like them to be in some areas, with the expectation that the situation will improve. And it is.

4. Somethings are unnecessarily done at runtime when they shouldn't be. For instance, you can link to a C library and use the library functions just fine. However, the community doesn't want you to link to the library, they often want you to unnecessarily add startup overhead and load it dynamically, and they often don't understand the place and need for such a thing. For instance, with a game that *requires* SDL to run, there's no point in dynamically loading it at runtime. However, this is done anyways and it both complicates life and bindings. This isn't the fault of the language.


If you're referring to Derelict, as far as I know it's the only collection of C bindings in D Land that actually loads libraries dynamically. Every other binding I've seen is static. I implemented Derelict that way for a reason (not because I "don't understand the place and need for such a thing"). Derelict is certainly not representative of the community's attitude as a whole to C bindings.
Correct me if I'm wrong, but from what I've heard, D is a "replacement" of C++


It's a systems programming language, if that's what you mean. Nothing's going to "replace" C++ any time soon. But it is certainly an alternative.

that doesn't work (it's unstable),


D1 has been stable since its release in 200x (I really can't remember the year -- 2007?). D2 was unstable for quite some time because it was under heavy development. Now, it's recommended over D1. And improving with each release of DMD.

has no real standard library (or it has two, I can't remember which),


Phobos has always been the standard library. For D1, it was rather lacking, so a community effort put together an alternative (Tango). For D2, Phobos is much better than the D1 version and is the only game in town.

and which no-one in the real world uses.


There are a number of real world people active in the newsgroups who would probably be surprised to learn they aren't using D!

> Because some people don't like/understand functional programming? I still don't really get it. Maybe I should learn Scala, it might be a gentler introduction than Haskell.

I was trying with Haskell for some time and although it was nice, I found out it was too difficult for potential contributors and not quite easy for myself as well.

Considering Python for some time, but then decided to try with D (for multi-platform desktop app) wanting something higher than C++ (avoiding pointers, having GC etc.).

However, as mentioned above, there is 'poor library support' and here I'm mostly thinking about not having any decent GUI toolkit which is actively developed.

What do you think about Scala as potential replacement for D to be able to write the code *today* ?

I like FP, but Clojure is probably too Lispy for our taste?
closed account (S6k9GNh0)
In my opinion, if you ask "why you shouldn't use D", the only two things that are really mark down are actual flaws in the language itself and the community that surrounds the language. D2 is immature and it really pains me when I get people that bash the language for an unstable std library or compiler or even real-world use when all of these are becoming untrue and that shouldn't effect the actual reputation of the language in the first place.

There are three GUI toolkits (possibly more) actively developed in D. wxD (which is actually a wxWidgets binding to C and then D just interfaces to that C binding), DWT, and DGUI. You can also use GTK+.

EDIT: I'm tired of playing the D representative. Some of you should give D a bit of your time instead of making rather poor claims about it.
Last edited on
> wxD (which is actually a wxWidgets binding to C and then D just interfaces to that C binding),

I did my homework, but, wxD is not actively developed and main (only) developer announced he is stepping down from the post, although he put the project on github. Still, hte port is not complete and future is not certain.


>DWT,

Same thing with DWT, especially considering DWT2 and the port is based on Old SWT-3.4.

> and DGUI.

It is, afaik, Windows-only and I wrote "multi-platform desktop app".

> You can also use GTK+.

GtkD is in the best shape, but it does not look well on Windows, and especially on Mac OS.

Let me add that QtD is not actively developed either. :-(

> EDIT: I'm tired of playing the D representative. Some of you should give D a bit of your time instead of making rather poor claims about it.

Well, I like many things about D, but it is simply not ready for production *today* unless one has lot of time building its ecosystem.
rapidcoder wrote:
Code completion is pretty much a basic feature. Without it, IDE is not more than a fancy editor. So no surprise, you don't use it. I don't need syntax highlighting as much as code completion.

But you also forgot:
- error highlighting (not just syntactical errors, type errors too)
- code style inspections (things like find bugs etc.)
- type-aware refactoring
- stable debugger
- documentation support


D has better IDE support than you are aware of.

Mono-D supports context sensitive code completion, type aware renaming, debugging, error highlighting, and soon tool tips. VisualD also supports code completion (although still experimental), debugging, error highlighting, and I believe simple refactoring features. I've also heard good things about DDT, though I've never used it, nor am I a huge fan of the Eclipse IDE.


And your argument D is a systems programming language is wrong if noone is doing systems programming in it. It seems you can't give *any* good counterexample showing I'm wrong, so you resorted to ad hominem arguments.


You obviously don't know what a "systems programming language" is. Wikipedia could be your friend here.
No Operating System (to my knowledge) has ever been written in Go, but that does not mean Go isn't a systems programming language.


chrisname wrote:
I don't see the point of D. If you want something higher-level than C++, use C#

D is more than just the power of C++ with the syntactical simplicity and garbage collection of C#. D has built in Unittesting, Contract programming, dynamic & associative arrays, sub-functions, readable advanced metaprogramming, and more. It has it's limitations and bugs of course, but It's ambitions are defiantly in the right place. There has been major improvements in stability and IDE integration recently, and D2 has a single standard library. I recommend downloading MonoD/VisualD and giving it a try before judging it too much off negative hearsay.
closed account (S6k9GNh0)
https://github.com/d-widget-toolkit/dwt

wxD and qtD both just fell off relatively recently and I wasn't aware. They should still be usable anyways given there last updates.

Also gour, a "multi-platform desktop app" doesn't pertain to GUI. You said, "not having any decent GUI toolkit". Regardless, they are available.

Something else I'm not happy with currently is that you guys can't blame D itself for not having things like a "GUI toolkit". That's your job to make. It's like someone gives you a job, you don't do that job, then you blame the guy who gave you the job for not getting the job done. It doesn't make sense. Thus, the point you're making is once again poor.

If people stand around bitching that there is no GUI toolkit, that doesn't mean one pops up magically from the D coding fairy.
Last edited on
https://github.com/d-widget-toolkit/dwt

Interesting...wasn't aware it is moved to github.

They should still be usable anyways given there last updates.

The could be, but too risky to base project on them.

You said, "not having any decent GUI toolkit". Regardless, they are available.

By "having", I assume nicely supported as well, which is simply not the case.

Something else I'm not happy with currently is that you guys can't blame D itself for not having things like a "GUI toolkit". That's your job to make. It's like someone gives you a job, you don't do that job, then you blame the guy who gave you the job for not getting the job done. It doesn't make sense. Thus, the point you're making is once again poor.

I do not agree, if one wants to write app in e.g. Python, then one can choose whatever GUI he/she likes, not to speak about the other libs required (database bindings etc.).

Today it's simply not practical to speak about the benefits of 'core' language, if 'common' libs, build tools, IDE-support etc. are missing.

It's naive to expect from end-users to be ecosystem builders.

I had enough with Haskell and its 'child-diseases' - nice language, but not practical-enough for daily work, although it had improved considerably.

If people stand around bitching that there is no GUI toolkit, that doesn't mean one pops up magically from the D coding fairy.

That's obvious, but then we cannot label as 'production ready' if there are no 'batteries'.

I simply do not have time to single-handedly lead the effort of developing/maintaining one of the GUI toolkits like Qt/wx 'cause it would mean that all my free time I'm allowed to use would be spent on ecosystem instead of the application I plan to write which requires lot of time & effort by itself.

In such a situation, it's no wonder that people will choose another, not so fancy language which ships with "batteries included" if not with "AC adapter". :-)
closed account (S6k9GNh0)
You're not leading anything by yourself. There are *tons* of projects that are simply not supported.

The end-user IS the ecosystem builder. It was for everything from ASM to Bash. People don't have a library they like so they make something more preferable themselves and show others, maybe in a sold form. Simple as that.

The batteries are included, you're just blind to them. If you don't want to use a DWT or gtkD, then you're just being irritating with no basis.

Every library in C is available in D. Even some libraries in C++ are available in D (because of it's very partial ability to export and interface with C++). Thus, D has at least as much library support as there is in C. The implementation of the tools you need are there. If you want a D syntax for such libraries, you can hardly call yourself a programmer if you can't take the day or two to wrap a library up in sugary syntax.
Last edited on
The end-user IS the ecosystem builder. It was for everything from ASM to Bash.

What work is to be done by e.g. Python programmer to write desktop app in terms of building ecosystem?

People don't have a library they like so they make something more preferable themselves and show others, maybe in a sold form. Simple as that.

We'd have lot of work to build specific libs for our app to have enough time to work on basics.

The batteries are included, you're just blind to them. If you don't want to use a DWT or gtkD, then you're just being irritating with no basis.

DWT is not actively maintained and as far as considering gtkD, maybe the spec of 'having good look on all to be supported platforms' is excluding it?

Every library in C is available in D. Even some libraries in C++ are available in D. Thus, D has at least as much library support as there is in C.

Using C-like API in D does not make much sense and robs one of D's advantages.

If you want a D syntax for such libraries, you can hardly call yourself a programmer if you can't take the day or two to wrap a library up in sugary syntax.

Pls. show me how to bind Qt or wx in two days, providing higher-level D-ish API.

If D is so great as you advertise it, we'd see it use on much wider scale with lot of e.g. desktop GUI apps written in it, but this is simply not the case.

Fortunately, it's not that everyone in D community reason like you, so people are working on the missing stuff, but considering D is ready for prime time does not help...so no point to discuss more.

I'd like to use D and will try my best, but it does not depend on me and it is not easy to sell it to others when they're questioning D's ecosystem...'cause we are not talking about toy projects here. ;)
closed account (S6k9GNh0)
You can't wrap up a project like wx and qt, mostly because they're so huge and they use C++. C libraries are a little bit different. It's not hard to create D bindings from a C library and it's also not hard to wrap those up.

You know that a lot of the python modules actually started as user libraries and are proposed and implemented (generally through example implementations of the idea) by the community right?

DWT is actively maintained. Last commit was yesterday. That's why I linked to the git repository. However, I don't see a tarball release.

From now on, because of the lack of support for D and the really poor arguments against it, I'm no longer using C++. D is currently my mainstream language.
Last edited on
You can't wrap up a project like wx and qt, mostly because they're so huge and they use C++. C libraries are a little bit different.

Right, but the point is that those are nice candidates as GUI toolkit choice.

It's not hard to create D bindings from a C library and it's also not hard to wrap those up.

Have you used SWIG with its D support?

You know that a lot of the python modules actually started as user libraries and are proposed and implemented (generally through example implementations of the idea) by the community right?

I do not say it's not possible to do it for D, but, obviously D is not there, although we hope it will arrive soon.

DWT is actively maintained. Last commit was yesterday. That's why I linked to the git repository. However, I don't see a tarball release.

My understanding, based on Jacob's replies to me is that that step was planned but, somehow, didn't done earlier, although I'm not sure he has time to work on it at the moment.

From now on, because of the lack of support for D and the really poor arguments against it, I'm no longer using C++. D is currently my mainstream language.

I'm glad for you and hope we'll be able to manage it as well.

btw, do you use ncurses for your apps?
gour wrote:
Considering Python for some time, but then decided to try with D (for multi-platform desktop app) wanting something higher than C++ (avoiding pointers, having GC etc.).

C# could be perfect for you. I feel that Python is somewhat poorly designed while to me, C# emanates good design. As any of the regulars on this forum will tell you, I don't particularly like Microsoft, but when I learned C# I was amazed. Not only did the language feel elegant, the standard library (either .Net framework or the open-source implementation, Mono) is amazing - very well structured and easy to use, logical, and it has excellent documentation on MSDN. Additionally C# was what finally got me to understand OOP (that and the Oracle Java tutorial, although I stopped learning Java after a while because C# does the same things but is, in most (but not all) cases, better).

As for Haskell, it is also a language that is clearly very well designed, but I just can't get my head around functional programming, even after reading the tutorial "for C Programmers" :P

@Michael Parker,
Okay, fair enough, I was wrong.
C# could be perfect for you.

Interestingly enough, but I was reading about C#/Mono today. :-)

I feel that Python is somewhat poorly designed while to me, C# emanates good design. As any of the regulars on this forum will tell you, I don't particularly like Microsoft, but when I learned C# I was amazed. Not only did the language feel elegant, the standard library (either .Net framework or the open-source implementation, Mono) is amazing - very well structured and easy to use, logical, and it has excellent documentation on MSDN. Additionally C# was what finally got me to understand OOP (that and the Oracle Java tutorial, although I stopped learning Java after a while because C# does the same things but is, in most (but not all) cases, better).

Thank you for your input...I'll research more about what Mono might offer.

In terms of GUI, I see there is GTK# & wxNet although not sure how much is the latter actively developed.

As for Haskell, it is also a language that is clearly very well designed, but I just can't get my head around functional programming, even after reading the tutorial "for C Programmers" :P

Heh, I really liked Haskell, but too much thinking required for supposedly simple problems. :-)
gour wrote:
In terms of GUI, I see there is GTK# & wxNet although not sure how much is the latter actively developed.

I've not tried wxNet or Windows.Forms (the .Net GUI library) but Gtk# is good, it works on Mono and .Net meaning it is supported on Windows, Mac OS, Linux and probably some others.
I've not tried wxNet or Windows.Forms (the .Net GUI library) but Gtk# is good, it works on Mono and .Net meaning it is supported on Windows, Mac OS, Linux and probably some others.

It looks wxNet is not alive any longer, so Gtk# seems to be the only option then. Thanks.
Ah well, Gtk# is pretty nice. It's a lot better than Gtk+, at least.
I am language neutral for programming. I discover for a programming language to really take off, we need a major IT player like say MS,Google,etc to reveal a major project that is developed in that *new* language. The major project must be a phenomenal success too. Only then will they draw the attention of other companies who wonder why that *new* programming language is powerful and intend to devote resources into it.

Java came to everyone attention due to the Java applet in web pages during Internet infancy years. But Java was not created as just for Web interactive effects only isn't it? It is a full-fledged programming language. But the Java applet draw a lot of people attention to it and we slowly go on to discover the *whole* programming language and thereafter we know the story don't we?

So if say D is a replacement for C++, then it need a major endorsement from major IT players or at least come out with a innovative project that take the world by storm. This will be a fast way for D to gain a foothold in business IT systems isn't it?

PS Google has GO but I don't know why it has yet to take the world by storm. Hmmm...
Ah well, Gtk# is pretty nice. It's a lot better than Gtk+, at least.

In which sense you consider it better?

As far as look is concerned, it should be the same as GTK+.
From now on, because of the lack of support for D and the really poor arguments against it, I'm no longer using C++. D is currently my mainstream language.

I was taking a brief look at possible alternatives for D - Clojure & Scala first, but noticed that as far as GUIs are concerned, they won't bring a big change and would put us into Java ecosystem.

Lastly, we considered C#/Mono, but seeing that Gtk# is practically the only viable option, decided to stay with D, starting by writing non-GUI parts of the project.

Hopefully, later GUI situation will improve and/or we could help more to achieve desired goal.

Thank you for your input - it was helpful. ;)
Pages: 123