www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - maintenance

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
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 joined!
Sep 15 2020
next sibling parent reply James Blachly <james.blachly gmail.com> writes:
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 
 joined!
Andrei, Thanks for doing this often thankless work. I benefit every day from your and others' work on Phobos
Sep 15 2020
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
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 
 joined!
Andrei, 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.
Sep 16 2020
next sibling parent Jon Degenhardt <jond noreply.com> writes:
On Thursday, 17 September 2020 at 02:16:06 UTC, Andrei 
Alexandrescu wrote:
 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.
Very much agree with this. Examples of good D code is something I wish there was more of. Improvements to Phobos in this area are definitely worthwhile. (What I could really use right now are a few more samples using asyncBuf from std.parallelism!) --Jon
Sep 16 2020
prev sibling next sibling parent bachmeier <no spam.net> writes:
On Thursday, 17 September 2020 at 02:16:06 UTC, Andrei 
Alexandrescu wrote:
 On 9/15/20 8:27 PM, James Blachly wrote:
 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.
If you want to write code using ranges, reading the standard library is time well spent. Idiomatic range-based programming is not always easy.
Sep 17 2020
prev sibling parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
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 
 joined!
Andrei, Thanks for doing this often thankless work. I benefit every day from your and others' work on Phobos
Seconded!
 
 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. -Steve
Sep 17 2020
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 9/17/20 5:39 PM, Steven Schveighoffer wrote:
 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.
Word. Actually I've had quite a bit of success with this: private mixin template ImplementEmpty(alias member) { static if (isInfinite!(typeof(member))) { // Propagate infinite-ness. enum bool empty = false; } else { property bool empty() { return member.empty; } } } PR coming soon.
Sep 17 2020
prev sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Tuesday, 15 September 2020 at 17:38:09 UTC, 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 joined!
Great initiative 👍
Sep 16 2020