| |
| Posted by Kapps in reply to forkit | PermalinkReply |
|
Kapps
Posted in reply to forkit
| 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 looked into actually using AWS with D, and wrote it in C# instead.
- 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.
|