May 03, 2019
On Friday, 3 May 2019 at 16:59:29 UTC, H. S. Teoh wrote:

>> The first step towards that, IMO, is to create a utility library that has no dependencies whatsoever.  All other libraries, language implementations, and even the compiler itself could then begin their implementations by importing that fundamental utility library.  Of course, you wouldn't have to import it if you didn't want to, but it would be highly productive and idiomatic-D to do so.
> [...]
>
> I've given a lot of thought to reusable components lately. More and more, I'm coming to the conclusion that proper API design is absolutely essential.  If designed wrongly, an API will essentially *force* dependencies upon all of its users, and this effect compounds across multiple nested APIs, the end result being an inseparable hairball of dependency hell that you have to either import all of it, or not at all.

I'm not proposing a new API, but I'm not against it either.  What I'm proposing is to just copy over the existing APIs in Phobos that don't require druntime for their implementation.  It would probably be a good idea to exclude any API from Phobos that is considered a mistake. And, of course, some Phobos implementations do require druntime and dynamic memory allocation, so those would also be excluded, but everything else (that makes sense) could be copied over to the library I'm proposing.  Those familiar with Phobos would feel right at home using this library.

Mike


May 03, 2019
On Fri, May 03, 2019 at 10:52:10PM +0000, Mike Franklin via Digitalmars-d wrote:
> On Friday, 3 May 2019 at 16:59:29 UTC, H. S. Teoh wrote:
[...]
> > I've given a lot of thought to reusable components lately. More and more, I'm coming to the conclusion that proper API design is absolutely essential.  If designed wrongly, an API will essentially *force* dependencies upon all of its users, and this effect compounds across multiple nested APIs, the end result being an inseparable hairball of dependency hell that you have to either import all of it, or not at all.
> 
> I'm not proposing a new API, but I'm not against it either.  What I'm proposing is to just copy over the existing APIs in Phobos that don't require druntime for their implementation.  It would probably be a good idea to exclude any API from Phobos that is considered a mistake.
[...]

Understood.  Still, now would be a good time to start vetting which APIs are more likely to be beneficial in the long term, and which APIs will only lead to dependency hell later on.  Leave the poor choices in the past; pick out the cream and leave the dregs behind.  Then, build on this refined core something new and more wonderful.


> And, of course, some Phobos implementations do require druntime and dynamic memory allocation, so those would also be excluded, but everything else (that makes sense) could be copied over to the library I'm proposing.  Those familiar with Phobos would feel right at home using this library.
[...]

Would love to see where this leads.  Hopefully it won't peter out before it has something to show.


T

-- 
Talk is cheap. Whining is actually free. -- Lars Wirzenius
May 03, 2019
On Friday, 3 May 2019 at 23:19:38 UTC, H. S. Teoh wrote:

> Would love to see where this leads.  Hopefully it won't peter out before it has something to show.

Well, I need help.  I'm currently preoccupied trying to fix a few compiler bugs so I can start refactoring druntime and begin converting runtime hooks to templates.  That's going to keep me busy for at least a year, unless others jump in.  I won't even be able to start working on this until after that.

If anyone likes the idea and is ready to volunteer their time and effort towards it, let's get it going.  Who's willing to jump in, help me create the repository, CIs, and start submitting PRs?

Mike

May 04, 2019
On 2019-05-03 15:30, Mike Franklin wrote:

> The 2nd task that I think is important right now is to make a dependency-less utility library.  I have never discussed this with anyone except on the forum, so I don't know what Andrei or anyone else thinks of it.  I wish I had more of an opportunity to discuss things like this on a regular basis with other D developers, but I don't know how to facilitate that.

DConf would be a great place for that, but it might be too long between the conferences.

-- 
/Jacob Carlborg
May 05, 2019
On Saturday, 4 May 2019 at 13:50:01 UTC, Jacob Carlborg wrote:

> DConf would be a great place for that, but it might be too long between the conferences.

Yes, but I regret that I won't be there.  Looking at the AGM agenda (https://github.com/thewilsonator/Dlang-AGM) it appears you'll have plenty to talk about and don't need any of my noise.

May 06, 2019
On Friday, 3 May 2019 at 13:30:01 UTC, Mike Franklin wrote:
> You can find me on Slack and Discord under the handle JinShil should you wish to have more of a dialog.


I wanted to contact you via Discord, but it didn't work. I have created an issue at https://github.com/JinShil/utiliD

Cheers,
Piotrek
1 2
Next ›   Last »