www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - What I like most AND what I don't like most - about D

reply forkit <forkit gmail.com> writes:
So this thread is designed to bring some balance, between being 
negative about D, and being positive about D.

To participate, you must (should, since I cannot 'enforce' this) 
post two things:

(1) What I like most about D:

(2) What I dislike most about D:

Please keep it simple and short, ideally one item for each would 
ideal.

passive-aggressive types.. stay away...go somewhere else please!

if you're eager to respond to someones post, please take a moment 
to consider whether that is in the spirit of this thread.

I'll start:

(1) What I like most about D:
     D is a multi-paradigm programming langauge, and enables what 
I like most, which is flexibilty towards experimenting with 
different approaches during the design phase of a solution to a 
problem.

(2) What I dislike most about D:
     There is no option to declare an invariant of a class type 
that the compiler will enforce, during compile time, from code 
surrounding that class (in the same module) - including unit-test 
code. But easily solved with something like 'scope private', if 
it were available in the language.
Jun 11 2022
next sibling parent reply zjh <fqbqrr 163.com> writes:
On Sunday, 12 June 2022 at 01:48:43 UTC, forkit wrote:
 So this thread is designed to bring some balance, between being 
 negative about D, and being positive about D.

 To participate, you must (should, since I cannot 'enforce' 
 this) post two things:
I like D: `'metaprogramming'`, powerful `static if` and clean `.` calling syntax than `::`. Clean grammar and powerful `'introspection'`. I don't like D's: there is no `c++'s` `...`, There is no `'class encapsulation'` and 'stackless coroutine'. I hope `'d'` can be vigilant . The competition is becoming more and more fierce. `C++23` is very powerful . `D` should refactor `'DMD' code` quickly!
Jun 11 2022
parent zjh <fqbqrr 163.com> writes:
On Sunday, 12 June 2022 at 01:59:31 UTC, zjh wrote:
  clean
 `.` calling syntax than `::`.
  Clean grammar and powerful `'introspection'`.
Whenever I see `rust's` full screen '::' and `three and more` layer templates, I feel `very funny`.
Jun 11 2022
prev sibling next sibling parent arandomonlooker <shdkahdkhhhhhii gmail.com> writes:
On Sunday, 12 June 2022 at 01:48:43 UTC, forkit wrote:
 (1) What I like most about D:

 (2) What I dislike most about D:

 Please keep it simple and short, ideally one item for each 
 would ideal.
My humble, not particularly informed opinions: I like D's overall feel and it's mixture of features, in short. D's mixins, ranges, CTFE, delegates, UFCS, scope guards, unit-tests, iteration style, templates, contracts, UDAs, it's module system, it's easy interfacing with C, Objective C and C++'s OOP and it's compilation speeds are honestly the best part of the programming language. And for a language with all these features, D feels tidy, it's not merely a "C++" with more features, it feels unique in it's own right. I also like it's efforts to become safer, like the inclusion of a borrow checking system (live functions), mustUse and the "safe specification", i think they are going to improve D overall. The thing that i dislike most about D, on the other hand, it's D's lack of vision for the future. D doesn't have a clear roadmap with clear proposals, and the DIP process seems to me too strict. I don't know what D is going to have or eliminate next. Also, D is somewhat underpowered when it comes to it's features. D does not have structural bindings for arrays and tuples (or at the very least, a way for AliasSeq to have type inference and a possibility to skip what values of the tuple you want, maybe with a underscore like in Go; through, i can understand that it doesn't really fit in with the language), coroutines (yield, async, await, etc.), static array inference, lazy variables like in Swift (through, D allows excellent workarounds for this), named unit-tests (like in Zig; maybe with the possibility to skip them internally, again, like in Zig), generic lambdas, an "inline" attribute for functions instead of the pragma-inline idiom, support for Unicode operators, anonymous structures, certain idioms: why is a case range statement styled like "case 1: .. case 3" and not like "case 1..3:"? It's more readable? Thank you all in advance.
Jun 11 2022
prev sibling next sibling parent Daniel N <no public.email> writes:
On Sunday, 12 June 2022 at 01:48:43 UTC, forkit wrote:
 So this thread is designed to bring some balance, between being 
 negative about D, and being positive about D.

 To participate, you must (should, since I cannot 'enforce' 
 this) post two things:

 (1) What I like most about D:
CTFE and UFCS
 (2) What I dislike most about D:
GC
Jun 12 2022
prev sibling next sibling parent reply Alexandru Ermicioi <alexandru.ermicioi gmail.com> writes:
On Sunday, 12 June 2022 at 01:48:43 UTC, forkit wrote:
 So this thread is designed to bring some balance, between being 
 negative about D, and being positive about D.

 To participate, you must (should, since I cannot 'enforce' 
 this) post two things:

 (1) What I like most about D:
Arrays, way better than C or C++. Then GC, UFCS and CTFE + template meta-programming.
 (2) What I dislike most about D:
Lack of proper IDE plugins, with proper auto-completion and integration (Ok, when you have lots of time and willpower). Over focus on C/C++ people with all betterC/ImportC, when the basic tooling is still lacking (IDE integration). Best regards, Alexandru.
Jun 12 2022
parent reply ryuukk_ <ryuukk.dev gmail.com> writes:
(1) What I like most about D:

     - fast compile speed
     - great metaprogramming
     - C like syntax
     - great knowledgeable community
     - walter, he knows his stuff, and don't like to bloat things
     - importc, when it'll be completed!

(2) What I dislike most about D:

     - GC
     - core language features that end up being library in std. 
(sumtype/tuple)
     - runtime/std being too dependent
     - everything in a module will be compiled, even if not used, 
it makes it hard to write multi platform code in a single module, 
i am forced to split things in DUB project, wich SUCKS
     - lack of proper language server with semantic analysis, this 
one is becoming annoying..
     - reserved keywords (init, debug, equals), this one really 
hurts me a lot (not being able to choose API with names: 
init/deinit)
     - incomplete/class-based Allocators
     - betterC broke, mostly with static float array
Jun 12 2022
parent Adam D Ruppe <destructionator gmail.com> writes:
On Sunday, 12 June 2022 at 13:39:37 UTC, ryuukk_ wrote:
     - everything in a module will be compiled, even if not 
 used, it makes it hard to write multi platform code in a single 
 module
this is what version and static if are for......
Jun 12 2022
prev sibling next sibling parent Zoadian <no no.no> writes:
Pros:
- clean syntax
- ctfe
- ufcs
- metaprogramming
- native code
- module system
- default initialization of variables
- slices/arrays
- GC

Cons:
- lack of first class types (would enable using types with ctfe, 
get rid of templates as a separate metaprogramming language):
- half implemented features
- ad hock addition of features without proper vision of unwanted 
interactions
- unwillingness to properly fix the language and introduce 
breaking changes
- while metaprogramming is great, it still lacks some 
functionality i'd like to have (for example a trait that gets me 
aliases to all variables a function accesses that are from 
outside it's scope)
- no pattern matching
- no tuples / destructuring assignment
- autodecoding!!!
Jun 12 2022
prev sibling next sibling parent "H. S. Teoh" <hsteoh qfbox.info> writes:
On Sun, Jun 12, 2022 at 01:48:43AM +0000, forkit via Digitalmars-d wrote:
 So this thread is designed to bring some balance, between being
 negative about D, and being positive about D.
 
 To participate, you must (should, since I cannot 'enforce' this) post
 two things:
 
 (1) What I like most about D:
- Sane template syntax. - CTFE. - static if. - Compile-time introspection. - UDAs. - DbI. - Built-in unittest blocks. - GC. - Delegates. - UFCS + ranges. - foreach (i; x..y) - Compile speed (for small programs).
 (2) What I dislike most about D:
- Ruining my appetite to use any other language. ;-) - Silly int promotion rules: - `ubyte b; b = -b;` issues a compile error. - bool autopromotes into int, causing unintended overload matching. - char implicitly converts to int, causing unintended overload matching. - Arbitrary limitation of lambdas and delegates to single-context. - Inscrutable error messages when there's a typo in a nested lambda deep inside a UFCS chain. - Certain Phobos modules trigger ridiculously large template instantiations, slowing down compile-times by several seconds at least. - Excessive compiler memory usage, esp. for template-heavy code. T -- Having a smoking section in a restaurant is like having a peeing section in a swimming pool. -- Edward Burr
Jun 12 2022
prev sibling next sibling parent Paulo Pinto <pjmlp progtools.org> writes:
What I like about D:

- Being a systems programing language with GC
- Type system
- Metaprogramming capabilities
- UFCS
- OOP approach
- COM support


What I dislike about D:

-  system by default
- templates as workaround for attribute soup
- metaprogramming with strings instead of AST
- the way features get added and fail to be implemented end to end
Jun 12 2022
prev sibling next sibling parent reply Guillaume Piolat <first.last google.com> writes:
On Sunday, 12 June 2022 at 01:48:43 UTC, forkit wrote:
 (1) What I like most about D:
Suitable for prototyping to production. You can add annotations and cleanliness as you go, which respects how software is created.
 (2) What I dislike most about D:
The D forums is attractive to a peculiar sort of people that want to boss people around and tell volunteers what to do.
Jun 13 2022
parent reply forkit <forkit gmail.com> writes:
On Monday, 13 June 2022 at 18:59:26 UTC, Guillaume Piolat wrote:
 
 ...
 The D forums is attractive to a peculiar sort of people that 
 want to boss people around and tell volunteers what to do.
this is NOT in the spirit of this thread.
Jun 13 2022
parent reply Guillaume Piolat <first.last gmail.com> writes:
On Tuesday, 14 June 2022 at 01:20:33 UTC, forkit wrote:
 On Monday, 13 June 2022 at 18:59:26 UTC, Guillaume Piolat wrote:
 
 ...
 The D forums is attractive to a peculiar sort of people that 
 want to boss people around and tell volunteers what to do.
this is NOT in the spirit of this thread.
You asked what people disliked most about D. This is what I dislike most about D. Let's sum up. An anonymous user opening a thread that will likely deride into a flamewar, (after 100 pages of "why D is unpopular"), stating that lack of "strict private" is somehow the biggest flaw of D, and that everything need to stop and cater to their own perceived need is the definition of passive agressive - or should I say, trolling - at its finest.
Jun 14 2022
parent reply forkit <forkit gmail.com> writes:
On Tuesday, 14 June 2022 at 11:16:21 UTC, Guillaume Piolat wrote:
 On Tuesday, 14 June 2022 at 01:20:33 UTC, forkit wrote:
 On Monday, 13 June 2022 at 18:59:26 UTC, Guillaume Piolat 
 wrote:
 
 ...
 The D forums is attractive to a peculiar sort of people that 
 want to boss people around and tell volunteers what to do.
this is NOT in the spirit of this thread.
You asked what people disliked most about D. This is what I dislike most about D. Let's sum up. An anonymous user opening a thread that will likely deride into a flamewar, (after 100 pages of "why D is unpopular"), stating that lack of "strict private" is somehow the biggest flaw of D, and that everything need to stop and cater to their own perceived need is the definition of passive agressive - or should I say, trolling - at its finest.
I think you've just demonstrated 'trolling at its finest'. Of course, this was to be expected. The thread is about what people like most and dislike most about D (the programming language). It's not about what people they like or don't like. Please... find another thread for your trolling.
Jun 14 2022
parent Guillaume Piolat <first.last gmail.com> writes:
On Tuesday, 14 June 2022 at 11:20:03 UTC, forkit wrote:
 Please... find another thread for your trolling.
Just stating the obvious here.
Jun 14 2022
prev sibling next sibling parent Andrey Zherikov <andrey.zherikov gmail.com> writes:
On Sunday, 12 June 2022 at 01:48:43 UTC, forkit wrote:
 (1) What I like most about D:
- CTFE - metaprogramming
 (2) What I dislike most about D:
- poor quality of DMD: - no closures in CTFE - uses a lot of memory (>2GB to compile simple lib) - I had to do some workarounds to avoid OutOfMemory exception - unexpected behavior ([latest example](https://forum.dlang.org/thread/qgtgzwosimucsixyhodo forum.dlang.org)) - no roadmaps, timelines, milestones in evolution of D - what to expect in the future and when(!) - this brings a question: is there any commitment to improve the language/compiler/std? - I'd like to offer my help in improving but it's not obvious what to start with since I have no experience in writing compilers. I did few simple things but I don't see how I can help besides that.
Jun 14 2022
prev sibling next sibling parent Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= <ola.fosheim.grostad gmail.com> writes:
On Sunday, 12 June 2022 at 01:48:43 UTC, forkit wrote:
 (1) What I like most about D:
* That it was launched as a system language that was simpler and easier to read than C++, yet with a syntax that is familiar to C++ users. * That it is/was capable of changing to meet critical user demands (syntax sugar like interpolated strings is not critical in this context). * That there is a possible future of being able to create your own "high level framework" with 100% safe code over an unsafe runtime of your own making.
 (2) What I dislike most about D:
* That the culture prevents changing what is already in the language to make it live up to the original vision of being a clean alternative to C++. More features to "fix things" is, more often than not, the wrong answer. * That there isn't enough people with a compi.sci. background involved to drive it forward in a way that converges on on this vision of a "clean system level programming language". The evolution seems to be more "divergent" than "convergent" in 2022. * That hardcore users have too much influence over the evolution of the language, this is not good for long term usability. * freeze-"all"-threads-GC, UFCS and other liabilities that does not scale well.
Jun 15 2022
prev sibling next sibling parent Kapps <opantm2+spam gmail.com> writes:
On Sunday, 12 June 2022 at 01:48:43 UTC, forkit wrote:
 So this thread is designed to bring some balance, between being 
 negative about D, and being positive about D.

 To participate, you must (should, since I cannot 'enforce' 
 this) post two things:

 (1) What I like most about D:

 (2) What I dislike most about D:

 Please keep it simple and short, ideally one item for each 
 would ideal.

 passive-aggressive types.. stay away...go somewhere else please!

 if you're eager to respond to someones post, please take a 
 moment to consider whether that is in the spirit of this thread.

 I'll start:

 (1) What I like most about D:
     D is a multi-paradigm programming langauge, and enables 
 what I like most, which is flexibilty towards experimenting 
 with different approaches during the design phase of a solution 
 to a problem.

 (2) What I dislike most about D:
     There is no option to declare an invariant of a class type 
 that the compiler will enforce, during compile time, from code 
 surrounding that class (in the same module) - including 
 unit-test code. But easily solved with something like 'scope 
 private', if it were available in the language.
1) Templates, CTFE, memory management. It's easy to write good and performant native code. It has really cool unique features. The code feels safe while being flexible. Boilerplate is practically non-existent for concepts (but bad for individual methods due to attribute soup). As a language, it feels very nice. 2) - The "focus" seems to be so theoretical rather than writing code that most companies actually produce. The forums are a bunch of smart people arguing about theoretical improvements that don't really feel like they have a ton of practical value outside language theory. - Tooling / infrastructure / cloud support. Imagine the effort required to use D if you're a SASS company writing cloud-native code. I had a recent project where I was writing an in-memory database and wanted low level data structures that would be deployed as a Lambda in AWS. D should be a great fit. Then I - The attributes are a complete nightmare; const gets in the way of everything, writing template methods becomes extremely difficult because of having to deal with both const/immutable and non-const/immutable/etc functions, and the benefit feels very low. All of these attributes sound nice in theory, but I just don't feel they're remotely worth the sheer amount of issues they cause. - "Intellisense" functionality -- unfortunately I don't think these can ever be reliable enough in D due to UFCS, templates, and mixins. I love those features, but I'm not sure how you write a _reliable_ code completion / refactoring engine for D. I personally don't tend to use refactoring features unless I'm confident that the code could be analyzed 100% for things like references, and I just think that's extremely difficult to achieve with D.
Jun 15 2022
prev sibling parent harakim <harakim gmail.com> writes:
On Sunday, 12 June 2022 at 01:48:43 UTC, forkit wrote:
 So this thread is designed to bring some balance, between being 
 negative about D, and being positive about D.

 To participate, you must (should, since I cannot 'enforce' 
 this) post two things:

 (1) What I like most about D:

 (2) What I dislike most about D:
Like: Optional memory management, ability to use examples for SDL/OpenGL/etc that were written for C (m/l seamless C integration), compile time features, arrays and associative arrays are very natural unlike in other languages. I actually REALLY like immutable transitivity and stuff like that being options. When I write D code, it's almost always very clean. It feels like C programming, but it's a better C by a long shot. Dislike: Sometimes people paste code on the forum and I can't understand what it does. Then some people respond with a bunch of acronyms I don't know what they are so I still don't know. My previous projects never compile when I come back Immutable transitivity is required so sometimes I just want to write some code and all of the sudden I'm having to figure out what all these extra requirements are.
Jun 16 2022