June 09, 2023

On Friday, 9 June 2023 at 10:16:15 UTC, FeepingCreature wrote:

>

How would LTS help? That only means they'll end up stuck at an old LTS version. It buys you a year, and then it breaks anyway.

Answer is: planning and versioning. It's much easier to allocate your time to migrate once a year (ideally once every two years) than to end up in a constant loop of fixing small issues every month or so.

Breaking changes usually mean bumping major version number. This isn't what you want to do every month when you develop some sort of third party. Long-term breakage is okay, as long as it happens less frequently. And, as long as this breakage is actually meaningful, not this "deprecate stuff because we can't fix it". My user opinion is, a well-known bug is better than correctly working code that breaks code that already works this known bug around.

>

You'd have to postulate a person who is okay with fixing more breaking changes, so long as it's more rarely. I'm skeptical.

Provided that there will be more breaking changes. Actually, LTS branch will allow for more breakage short-term, allowing more freedom of D development, and resulting in less breakage long-term. Take this alias this issue mentioned earlier. If we had an LTS branch (or release), it could've been deprecated, and then un-deprecated again. Instead, since it's deprecated, there's no sense in un-deprecating it now since everyone kinda moved on already.

June 09, 2023

On Friday, 9 June 2023 at 09:22:10 UTC, GrimMaple wrote:

>

On Friday, 9 June 2023 at 08:05:18 UTC, Walter Bright wrote:

>

It's not about not caring about it. It's just that I can't see how it would be effective. Making LTS versions balkanizes the language into multiple languages, which will play hell with 3rd party library maintenance.

I disagree with this statement, and I see a lot of people agreeing with my disagreement :)
LTS is LTS for a reason, meaning that 3rdparty will (ideally) only target LTS, without having to target unpredictable compiler. [..]

What is your vision for LTS releases? How often would a new LTS version be released and for how much time would it be supported? How many LTS branches would be maintained in parallel? Something like the Ubuntu release cycle - https://ubuntu.com/about/release-cycle?
What is the range of supported versions that you would expect an actively maintained D library to support? Only the oldest LTS, or only newest one? What about the current versions?
What are the criteria for backporting changes to an LTS branch? While library functionality removals and new compiler errors are obviously a no-no, what about deprecations? On one hand, one would would prefer things to keep working as they were, but on the other hand deprecations are a migration tool - they let the users know that they need to adjust their code in order to be able to upgrade to a new version down the line.

There's also the question of certain bug fixes: usually druntime & phobos are straightforward, but there are some compiler bug fixes that can cause surprising regressions that are only discovered years (!) later, despite the best effort of everyone. I can assure you that this is not a theoretical concern - we've had hundreds of regression-causing bug fixes like this. The main cause is that the semantic processing part of the compiler codebase is very complex and convoluted. While some argue that the solution is ground-up from-scratch reimplemtnation (which is what the SDC project that has been years in the making is trying to accomplish), realistically, the most pragmatic option is to continuously refactor the codebase until it becomes much easier to maintain and evolve. Which is exactly what almost every major compiler contributor has worked towards on many occasions, but the reality is that we're still far from the place we want to be, and there's much more work to be done.

I don't expect the rate of change to decrease, (and I surely hope it doesn't as it means the development is dying!), so I would expect the divergence between the LTS release and the current one to constantly increase, both in terms of direct user-observable language changes, but also in terms of the codebase. There are many cases where in order to fix a bug you first need to refactor the code (so e.g. the logic is centralized in a single place and not spread across multiple files), which would make certain commits very difficult to apply to the LTS branch.

And even just in terms of user-facing changes, if the jump from LTS to the current release is too big, upgrading would become much more time consuming than the current status quo of a major release every two months, so in that sense, I would agree with Walter that this has the risk of splitting the community.

>

I don't understand how this is going to be worse for 3rd party, I only see wins.

While the past few releases may have been heavier on the deprecation side of things, once there's a new compiler release with shiny new feature X™, you're quite likely to get an influx of users requesting support for it, so sticking with an old compiler release is unlikely make everyone happy.

June 09, 2023

On Friday, 9 June 2023 at 10:59:35 UTC, Petar Kirov [ZombineDev] wrote:

>

What is your vision for LTS releases? How often would a new LTS version be released and for how much time would it be supported? How many LTS branches would be maintained in parallel? Something like the Ubuntu release cycle - https://ubuntu.com/about/release-cycle?
What is the range of supported versions that you would expect an actively maintained D library to support? Only the oldest LTS, or only newest one? What about the current versions?
What are the criteria for backporting changes to an LTS branch? While library functionality removals and new compiler errors are obviously a no-no, what about deprecations? On one hand, one would would prefer things to keep working as they were, but on the other hand deprecations are a migration tool - they let the users know that they need to adjust their code in order to be able to upgrade to a new version down the line.

If it were up to me - I'd just split D into D2 and D3. D2 being a stable non-breaking lang that only adds upon what it already has. And D3 being a playground with "whatever goes", until peopel agree it's good enough and split for D4 is required. However, I understand other points of view as well, so having at least some sort of stable release I am willing to treat as "good enough". A two-year cycle is a widely accept practice it seems, so why not adopt it?

>

There's also the question of certain bug fixes: usually druntime & phobos are straightforward, but there are some compiler bug fixes that can cause surprising regressions that are only discovered years (!) later, despite the best effort of everyone. I can assure you that this is not a theoretical concern - we've had hundreds of regression-causing bug fixes like this. The main cause is that the semantic processing part of the compiler codebase is very complex and convoluted. While some argue that the solution is ground-up from-scratch reimplemtnation (which is what the SDC project that has been years in the making is trying to accomplish), realistically, the most pragmatic option is to continuously refactor the codebase until it becomes much easier to maintain and evolve. Which is exactly what almost every major compiler contributor has worked towards on many occasions, but the reality is that we're still far from the place we want to be, and there's much more work to be done.

I think, in the real world, if you don't add new stuff -- you end up with less bugs, provided you fix existing ones. As in, bug fixes rarely lead to introducing more bugs, it's the development of new features that usually bring new issues. If you localize refactorings to a concrete issue - it's not too difficult to backport everything. Anything else is, unfortunately, tough luck (tm). In my view, an LTS branch should only recieve critical bugfixes, such as compiler crashes or security vulnerabilities. If something leads to a buggy behavior - that's a thing that should be fixed in main branch and released in the next LTS.

>

I don't expect the rate of change to decrease, (and I surely hope it doesn't as it means the development is dying!), so I would expect the divergence between the LTS release and the current one to constantly increase, both in terms of direct user-observable language changes, but also in terms of the codebase. There are many cases where in order to fix a bug you first need to refactor the code (so e.g. the logic is centralized in a single place and not spread across multiple files), which would make certain commits very difficult to apply to the LTS branch.

In my opinion, that is only going to happen if D continues do develop with no clear goal or target. Lack of understanding where D is heading towards is creating that issue almost singlehandedly. Of course you're gonna divert the community if big changes are going to keep popping out of nowhere, like ImportC did. Infact, I think, LTS branch might help bring order to somewhat chaotic nature of D development cycle. Provided that D wants to have any order, which doesn't seem to be the case. Again, it boils down to the fact that D developers (the lang & compiler ones) don't really use D on a day-to-day baiss, outside of the compiler. So they can't even grasp what I and others are talking about. How could they, if their "work" never affects them to any extent, they are free to change and break whatever they want. They don't have to deal with the damages that they cause.

>

And even just in terms of user-facing changes, if the jump from LTS to the current release is too big, upgrading would become much more time consuming than the current status quo of a major release every two months, so in that sense, I would agree with Walter that this has the risk of splitting the community.

It's still the same amount of changes, which are just easier to plan ahead for. And, again, it's not the changes themself that cause me pain, it's how frequent and breaking they are.

>

While the past few releases may have been heavier on the deprecation side of things, once there's a new compiler release with shiny new feature X™, you're quite likely to get an influx of users requesting support for it, so sticking with an old compiler release is unlikely make everyone happy.

The whole point of LTS is that everyone has the same version. I have written C++, C#, Obj-C, Java, and many other langs with LTS releases and nobody complained about the "recent" compiler being unsupported. Because everyone understands why it's called an "experimental" version, and they patiently wait for new LTS release.

June 09, 2023

On Thursday, 8 June 2023 at 19:43:56 UTC, Hipreme wrote:

>

For Hipreme Engine, I do get some errors on users when they use a different version, what I've done is simply limiting their version (my build system also includes an auto download system for the expected D version). I'm always trying to stick to the most recent version because i know that if I stick too much time with a version, when needing to jump 10 versions, everything will be broken (specially since I'm maintaining my own runtime now).

For Dplug I tell users what compiler they should use, even then it's useful when people try the latest and it brings up issues. So we ought to do that with the D compiler ourselves else noone will see the issues.

Even then my lib have very little breaking changes and people willingly use the former versions, to my dismay. I think people have a bit unreaistic expectations about their favourite rate of change.

I don't believe a D LTS would solve things (it's like a small schism in the language regularly), the current situation seems honestly ideal to me with relatively gradual upgrade paths.
Haven't had the same issues, I had very small issues with DFLAGS being required to make an actually standalone shared library with the newer DUB+LDC. Or dub.json comments being impossible at the moment, but nothing really striking.

June 09, 2023

On Friday, 9 June 2023 at 10:16:15 UTC, FeepingCreature wrote:

>

On Friday, 9 June 2023 at 09:22:10 UTC, GrimMaple wrote:

>

I disagree with this statement, and I see a lot of people agreeing with my disagreement :)
LTS is LTS for a reason, meaning that 3rdparty will (ideally) only target LTS, without having to target unpredictable compiler. I don't understand how this is going to be worse for 3rd party, I only see wins. Have you read the thread btw? I already posted an example (https://github.com/FreeSlave/icontheme/issues/2) where one person outright refused to do anything about their broken code. I'll copy-paste the reasoning (it's about deprecated alias this):

How would LTS help? That only means they'll end up stuck at an old LTS version. It buys you a year, and then it breaks anyway.

You'd have to postulate a person who is okay with fixing more breaking changes, so long as it's more rarely. I'm skeptical.

In my opinion, I do believe D is missing a LTS. It is needed.

For example, all I see are monthly releases. Which release should I be using? As the original post suggest, there are breaking changes not just in own code but with third-party libraries as well.

I would like to move over to D (from C#) for various server-side processes. Whenever I have an afternoon experimenting with D for a future project, I always hit a brick wall trying to test something.

For example nanomsg-wrapper. What am I doing wrong? No idea. I get errors. Now, since the creation of this post... maybe I need to use an older D release? However, if I then include another project, will have get more problems?

If we have a LTS build of, say. 18 months, the beta of the next build can be 12 after, allowing 6 months of tests and cleanups. It also allows third-parties to build their libraries/tools to LTS (as well as prepare for the next one)

I think .NET has a good system with .NET 5, .NET 6, etc. Of course, they likely have a larger team but I don't think an LTS workflow for D would cause that much problems? Monthly builds of dlang can continue, afterall.

Just my thoughts (and simplistic, I know.)

June 09, 2023

On Friday, 9 June 2023 at 11:42:50 UTC, Guillaume Piolat wrote:

>

blah

Oh crap, I do get the __traits(getAttributes) deprecation. Karma.

June 09, 2023

On Thursday, 8 June 2023 at 15:48:26 UTC, IGotD- wrote:

>

Unfortunately D is run as a hobbyist project for langauage geeks with little concern for the professional environment. It is nothing wrong with language geeks having a project but it doesn't mix well with projects that require stable language+stdlib.

Is it even true? I always thought D was pretty rigid when it comes to language features

Sure we get bunch of attributes, but what about the core features?

switch is still the same as it was in the past, other languages evolved it past what C has to offer, they have pattern matching

union same story, other languages came up with tagged union, coupled with improved switch, you got sweet pattern matching capabilities and safeties

tuple same story again.. other language, even the most high level ones (C#) have it builtin and support deconstructing...

Other languages evolve at faster pace, some are even catching up yet they are considered stable languages

The .enum proposal for that got shutdown is the proof

The switch as expression got ignored

The tagged union one was met with: "just use std.sumtype template soup and get shitty errors"

>

I repeat over and over again, we need to start with D3 so that language geeks can have a platform without interfering with D2. D2 should be put in maintenance mode now and the language should be considered to be finished.

I aggree, it's time for D3, for it will be useless without a vision for the future

June 09, 2023

On Thursday, 8 June 2023 at 15:00:04 UTC, Steven Schveighoffer wrote:

>

On 6/8/23 10:33 AM, GrimMaple wrote:

>

2.101 removed std.xml, which led to a significant rewrite of dlangui, which inevitably led to me leaving D (even though temporarily). And no, undeaD maintainers refused to fix my problems: https://github.com/dlang/undeaD/pull/54 , https://github.com/buggins/dlangui/issues/643 (tl;dr undeaD doesn't work with GDC)

This one is an issue with GDC and obscure varargs usage. I filed a bug on it, found that the answer is, GDC just isn't going to do that. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108763

I have it in my backlog to fix undead: https://github.com/dlang/undeaD/issues/55

I just decided to do it. And of course, it's taking more time than I would like...

Any help appreciated: https://github.com/dlang/undeaD/pull/56

-Steve

June 09, 2023
On Friday, 9 June 2023 at 08:05:18 UTC, Walter Bright wrote:
> It's not about not caring about it. It's just that I can't see how it would be effective. Making LTS versions balkanizes the language into multiple languages, which will play hell with 3rd party library maintenance.

Think about it, if there wasn't a new D2 project that was decoupled from D1. Where would D be today? I strongly suspect D would be near as "rich" as it is today. D1 would just stand still stomping.

Now it is time again to make that leap. Balkanization is a necessary evil I think.


June 09, 2023
On Fri, Jun 09, 2023 at 03:58:16PM +0000, IGotD- via Digitalmars-d wrote:
> On Friday, 9 June 2023 at 08:05:18 UTC, Walter Bright wrote:
> > It's not about not caring about it. It's just that I can't see how it would be effective. Making LTS versions balkanizes the language into multiple languages, which will play hell with 3rd party library maintenance.
> 
> Think about it, if there wasn't a new D2 project that was decoupled from D1.  Where would D be today? I strongly suspect D would be near as "rich" as it is today. D1 would just stand still stomping.
> 
> Now it is time again to make that leap. Balkanization is a necessary evil I think.

I wasn't around during the D1/D2 split, but AFAIK there were D1 projects that eventually had no way to transition to D2 because of fundamental language discrepancies that had no migration path.

If D3 ever happens, it would be nice to think about feasible migration paths for existing D2 code.

//

Also, as far as balkanization is concerned, I think we already have that with -betterC and @nogc.  Let's just face it, folks, the people embracing Phobos and GC are in their own camp, and the -betterC/@nogc crowd is in another camp, and the two aren't seeing eye to eye. Libraries written with Phobos in mind aren't compatible with betterC code, and libraries written with @nogc in mind, while in theory compatible with Phobos-using code, do present some friction (e.g., you have to go out of your way to clean up after yourself instead of letting the GC do it, like you would in non-betterC code; you can't pass a GC callback to a @nogc library, etc.).

So, fear of balkanization IMO is fallacious.


T

-- 
The best compiler is between your ears. -- Michael Abrash