Why is D unpopular?

H. S. Teoh hsteoh at qfbox.info
Sat Jun 11 00:48:29 UTC 2022


On Sat, Jun 11, 2022 at 12:25:08AM +0000, forkit via Digitalmars-d wrote:
[...]
> In OOP, the primary unit of scope/encapsulation is the class.
> 
> I'm not aware of there being different views on this matter - but
> happy to be enlightened.
>
> That is the basis on which I reject the assertion that D is a better
> OO language.

OK, you got me there. :-D  But the person you were replying to *did*
clarify that what they meant by "OO" is "encapsulation, separation of
concerns".  So not necessarily OO in the strict sense of the word.


> btw. I'm not a proponent of Java, as some have suggested ;-)
> 
> So using Java to rebutt my argument, is pointless ;-)

"Without geometry, life would be pointless..."

Sorry, wrong forum. :-P


> But I do think, programming language of the future need to default to
> immutability and memory safety. One should have of course, the option,
> to opt-out where that is needed and appropriate.

Memory safety -- definitely agreed. Just browsing the latest list of
CVEs one can't help noting that a disproportionately large number of
them come from memory safety flaws.  It may take another decade or four,
but languages that are unsafe by default will IMO eventually become
obsolete.

Immutability -- not so much.  Maybe something like Rust's `var` to ask
for mutability might work, but Haskell-style straitjacketed immutability
isn't my cup of tea.


> The problem with D, is that it set out to be a betterC, perhaps even a
> betterC++.
> 
> But when one sets out to design a better motorcycle, you don't end up
> with a motorcycle at all. You end up with something completely
> different.
> 
> The advantage of a motorcycle, is you can just jump on it a zoom
> off......  and of course, you have the rush of being in control of
> your own fate..
> 
> That's the advantage of the motorcycle. Safety issues were never a
> primary consideration - otherwise you wouldn't be on that motorcycle.
> 
> So designing a better C or C++ is a futile effort, that results in
> some strange hybrid of things.. that don't see to really go all that
> well together.
> 
> I don't want a seat-belt on my motorcycle.
> 
> I don't want the seat-belts taken out of my car either.

But but... *I* want car-torcycle with half-length seatbelts that come
off automatically when I'm getting on or off, but stay firmly on in the
case of an accident!  Why can't I have both?  :-P  Surely with DbI and
the appropriate UDAs, and perhaps an undocumented -preview=seatbelt
switch or three, that could be made to work...!


T

-- 
People tell me that I'm skeptical, but I don't believe them.


More information about the Digitalmars-d mailing list