schveiguy at gmail.com
Thu Sep 17 21:39:27 UTC 2020
On 9/16/20 10:16 PM, Andrei Alexandrescu wrote:
> On 9/15/20 8:27 PM, James Blachly wrote:
>> On 9/15/20 1:38 PM, Andrei Alexandrescu wrote:
>>> Looks like there's a fair amount of opportunity to improving code in
>>> phobos in ways that reduce its complexity and size, and also make it
>>> more robust without breaking backwards compatibility. I just took
>>> std.algorithm.comparison because it kinda was the first
>>> alphabetically, and there's some good red here:
>>> https://github.com/dlang/phobos/pull/7635/. Would be great if others
>> Thanks for doing this often thankless work. I benefit every day from
>> your and others' work on Phobos
> Actually it's quite satisfying in a relaxing kind of way. Like putting
> tools in order in the shop. Also it's important; I recall people
> recommended here that beginners look at phobos' source for how to write
> idiomatic D. I'd definitely want them to look at good code.
It's also instructive to see what *even the language maintainers* have
to do to workaround limitations of the language.
If there are things in Phobos that look way more complex than they
should be (you have a couple of good examples in your "Goofy code"
thread), then it might be a signal that we can do better with the
features the language provides.
As I said in my talk last year -- D's introspection and code generation
capabilities are the crown jewel of D. We should do everything possible
to improve the situation for those types of tasks.
More information about the Digitalmars-d