Is it time for D 3.0?

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Mar 27 20:16:19 UTC 2020


On Fri, Mar 27, 2020 at 03:08:51PM -0400, Steven Schveighoffer via Digitalmars-d wrote:
[...]
> Certainly I would consider Phobos part of the language at the moment.
> In D3, it could be separate if needed.

It's arguable, since some of the avid D users here actively avoid
Phobos, but OK.


> Note that I don't think we need DRASTIC changes to the language. I
> don't think we need to rename it or change core things. But we could
> just free up some of the roadblocks so we can break some eggs here.

I think for these smaller but still breaking things to be implemented as
a simultaneous new version like I suggested.  Have some kind of version
directive at the top of your file to indicate which language version the
source was written for, then everything below version X will support the
old semantics, but version X and above will use the new semantics.  As
long as the change isn't too drastic, source files with different
versions in the same project should still be compatible with each other.


> Probably there are some more things that make sense for a breaking
> change.  Exceptions might be redone as well. Maybe review keyword
> usage/consistency.  DIP1000 features might work better as a type
> constructor. Etc.
[...]

Honestly, I think cheap Exceptions could be done transparently of user
code, for the most part.  Instead of using libunwind or equivalent, for
example, just change the ABI to propagate an out-of-band error indicator
that, say in a register or something that gets checked by the caller and
branches to the function's exit block if set.


T

-- 
Give a man a fish, and he eats once. Teach a man to fish, and he will sit forever.


More information about the Digitalmars-d mailing list