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

H. S. Teoh hsteoh at qfbox.info
Sun Jun 12 23:19:35 UTC 2022


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 


More information about the Digitalmars-d mailing list