Any estimates on having exceptions in betterC?

H. S. Teoh hsteoh at quickfur.ath.cx
Fri May 3 23:19:38 UTC 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


More information about the Digitalmars-d mailing list