Re:Better C – A subset of D Programming Language
by schveiguy on Tuesday April 28, 2020 @01:30PM
(#23009446)
Yes, it supports interfaces and unions. One thing not being stated enough in this thread also is that the docs are not just a regurgitated version of the prototypes -- there's actual hand-written text that tells you what the things return.
Re:Better C – A subset of D Programming Language
by aldacron on Tuesday April 28, 2020 @10:52PM
(#23014768)
In the standard library, it's primarily in the range-based functions that you see this, where the type doesn't generally need to be known. And where you do see it, the documentation will describe what the function returns more accurately than any convoluted made-up type the function signature could show you.
If the docs are filled with this, then D is certainly coming off my list of langs to look at.
For functions that can return different types, I think interfaces or union types would be more helpful (not sure if D supports either though).