5 ms·
I don't know about the moderation stuff, but yes, from what I have read, D is very very complex. Also it seems to have a multiple personality disorder. Mr Bri
by WuHu 8y ago
I don't know about the moderation stuff, but yes, from what I have read, D is very very complex.
Also it seems to have a multiple personality disorder.
Mr Bright seemingly wants it to be the next C.
Mr Andrescu seemingly wants it to be the worlds best meta template programming language.
D users are equally split (is it a better C#, a better Python, a better this, a better that??).
It does seem to be very complex, undisciplined vision for a language that aims for mainstream use.
Then you have all the problems with the lack of library support for this or that, lack of support tools for this or that ...etc etc.
If you read the forums, people spend far too much time debugging their code, due to a variety of strange things that occur in the language due to all its different personalities trying to live in the same place.
So don't be decieved - there really are plenty of disadvantages in using D (and perhaps they outweigh the advantages).
- p0nce 8y ago> karma: 2 You are astroturfing HN like you were impersonating people on the D forums. Please stop.
- WuHu 8y agoWhat? I just expressed an opinion about a programming language. I didn't realised that was a crime on HN. You must be one of those D forum members that don't like other expressing opinions about D, (i.e. ones like TorUser warns us of.)
- germandiago 8y agoDid you try to use it? I did, not very intensively for now, but the general feeling has been good: - I can use it from day one if I know C++, something to consider if you want to get things done - it interoperates better than other languages with my C++ stuff - the metaprogramming capabilities are nice and familiar to someone coming from C++ - the standard library is well prepared and the ranges, algorithms, named tuples and others are well-thought designs that have zero overhead (they use compile-time mechanisms for algorithm selection or tuple code generation) - std.experimental.allocator: you can control memory management, though I did not use this myself and I do not know how mature it is - there are efforts to make the language more gc-free friendly if that is what you need - there is a switch for betterC that allows you to use a subset that is powerful yet still very light - compile times are good Is it complex? Well, it can get as complex as you want, but using it without being too fancy is joyful and easier than C++, definitely. I have been investigating several of these languages for a while, concretely, a bit closer Nim, Go and D. Go is very nice at what it does, but that's it. It can be written and used in teams easily, but it is too specialized: by specialized I mean you have the GC with the channels and goroutines systems but you do not have control on memory layout or indirection or allocation AFAIK. Interoperability is also more difficult than with D. Nim looks promising. The problem is that it looks promising, but the reality is that it is not ready for production use yet. Also, something that should look like an advantage looks like a disadvantage to me: it looks clean because it follows a Python syntax. D chose to follow C and C++. That is an advantage, no matter how clean Nim looks, because at the end, most people know C. The library ecosystem is far better in D also. Interoperability: I think Nim is easy to mix with C, but not with C++ and Objective-C. Do you really know of anyone that would adopt a language without a realistic migration path of their code bases? Maybe for hobby projects yes, but for enterprise? Because these things can get painful easily and they make for a lot of time wasted. D: powerful and understandable metaprogramming if you come from C++ (I saw Nim's metaprogramming and I must say it also impressed me, that is true). Good migration path. More mature than Nim. General purpose, can control memory allocation. Trying to solve real world problems. The most pragmatic tool for general purpose programming if you want good performance and getting things done, something I care a lot, because at the end the language is just a tool. I do not need a perfect tool, I need something convenient that lets me finish things. From this pack, for me, D is the only one that is a positioned candidate to be both general purpose and mature enough at this moment. Nim is not there yet, unfortunately, and interoperability and lack of maturity play against it strongly. If you add that almost anyone knows C and many people know C++, but many people will just not know Python, that is something else to consider. As for Go, it is too specialized in one area, which does very well. But it is what it is.
- dom96 8y ago> Interoperability: I think Nim is easy to mix with C, but not with C++ and Objective-C. What gave you that idea? Nim is easier to interoperate with C++ and Objective-C than any language that I know of (including D!). In addition I personally also consider Nim to be production ready (and know many others who do too). But I can appreciate that the pre-1.0 state makes people nervous.
- WuHu 8y agoYes, I spent 6mths with it. As with any programming langauge, if you do simple things, and do them often, then you'll probably have little to worry about. D certainly makes many things simple for you. On the otherhand, the language has no personality that you get your head around. It tries to be everything to everyone. If you are presented with some code for D app, it's not possible to understand what 'style' programming you'll see, until you see it - because the language supports so many paradigms. Although, not all paradigms are faithfully represented. For example, class-oriented programmers will get at least an intial shock, when they realise that private class members are public witin a module. Any code in a module can change any part of your encapsulated classes. Then, you have the issue of public being the default. Then, you have the issue of class instances being able to share mutable data. And the list goes on..and on... and on.. If you've never programmed before, these might not be such a big deal, but if you're an experience programmers from a mainstream langauges, you'll spend a large amount of your time working out all these things for yourself, most of the time. I personally do not see the benefit for experienced programmers to switch from a well supported, well maintained, mainstream langauges, to D. It just does not make sense to me. Sure D does some interesting things. Other languages can learn and take from D, just as D has taken so much from other langauges. In the end, there is nothing in D that really changes the nature of programming. It's all the stuff we already know, all wound up into one big monstrosity, that lacks any real supporting ecosphere.
- germandiago 8y ago> On the otherhand, the language has no personality that you get your head around I do not get this point. I use D as a C++ improvement (which is what it was since the beginning) and I can do from functional, to OOP to structured or generic programming. No personality? You mean it does not favor any paradigm? That is another of the reasons why I chose it. By this measure, Nim is another non-personality language: the package offers the same things -> soft real-time gc, generic, structured and OOP (with Nim Style programming), metaprogramming. Should I say that Nim has no personality and conclude it is not useful? Nim is not useful due to "metaproblems" -> tools, maturity, worse interoperability than D. I do not say the language is not nice, I just say that it is more complicated to get things done with it from a perspective of someone looking for something that can work. Also, following Python makes it for very nice-looking code, but I am not sure it was the right decision from a social point of view (more people know C/C++ than know Python). > For example, class-oriented programmers will get at least an intial shock, when they realise that private class members are public witin a module I consider that a design mistake, but that does not preclude powerful metaprogramming or superior interoperability, which are far more important to my use case. > Then, you have the issue of class instances being able to share mutable data. I make primarily use of structs and all gc stuff and mutability problems disappear. > I personally do not see the benefit for experienced programmers to switch from a well supported, well maintained, mainstream langauges, to D The case for C++ is still very strong for me. But try to get good compile times and do something along the lines of static if (I do not mean only if constexpr in C++ with templates, try to avoid macros for config if you want and you will see, or add a conditional member to a class, or simulate something like version, or generate code without messing with macros) > In the end, there is nothing in D that really changes the nature of programming. That is a fair opinion, but I can say that in D there are these small nice things that I value in day-to-day programming like static if (a powerful one, not one that is in the middle between useful and full-featured), overloading opDispatch for forwarding, fast compile times and a module system. The faster compile-times are really, really something that makes more of an impact, maybe, than everything else. I understand your point, D has nothing "revolutionary". D is not revolution, it is evolution. But D is targeted at doing and using techniques that have been useful for years (and not experimental) easier and convenient: from memory allocation control to gc-free programming, immutability or better interoperability (something that should not be underestimated when using older code bases). I really think that people that see nothing "new" in D should try and see how the full package works together. They will be surprised. And they will also be surprised at how much of the older techniques, in improved versions, they can use. Techniques that have been useful for decades, not experiments of the last FP trends or experiments for which drawbacks are not well known. I used to think things along the lines you say. I still use C++ mainly, but, when I have another chance, I will insist on D a bit more. I think it is worth the time. > It's all the stuff we already know, all wound up into one big monstrosity, that lacks any real supporting ecosphere. That is precisely the strong point of it. It is evolution, not revolution. Did anyone discover lately a better general programming paradigm suddenly that makes all the other obsolete? Not AFAIK. Packaging things in familiar ways has real advantages of lowering the learning curve or figuring out more easily how to interoperate with older code bases. As I said before, that should not be underestimated if you really want to get things done and deliver stuff. If you are just toying around maybe you enjoy more something more revolutionary. But if I have to get things finished, I would bet on D rather than Nim or Go for most use cases.