my d blog has idea of effect system to replace @nogc etc

Adam D Ruppe destructionator at gmail.com
Tue Aug 16 16:36:09 UTC 2022


On Tuesday, 16 August 2022 at 14:57:04 UTC, Guillaume Piolat 
wrote:
> I know it isn't really related, but currently on DUB there is 4 
> different @nogc nothrow string library, -betterC or not, 
> friendly licence or not, with various tradeoffs, and I'm about 
> to add another one.

Yeah. I think some of that is going to happen regardless just 
because a lot of us have the not-invented-here syndrome, and some 
of the tradeoffs are rooted in legitimate concerns.

When they have legitimate concerns, whether you have an effect 
annotation or not doesn't really matter (though the static checks 
are not always the best way to do it; a dynamic runtime check or 
a test suite might be just as good or even more appropriate). The 
lib might not be formally documented as unsuitable for you, but 
if it does something you can't allow, you're gonna be forced to 
find an alternative.

So I think multiple libraries for different requirements is 
always going to happen, and is actually a good thing. And having 
this documented and/or tested (again, whether static checks or 
runtime checks) can also be a good thing. Sometimes at least.

Though with D I think we're more duplicating because of just NIH 
or other sillier reasons than due to actual hard requirements in 
use. But still some of them are and even if we all worked 
together perfectly, we'd still want some separate libs that 
choose different trade offs.


More information about the Digitalmars-d-announce mailing list