July 08, 2023
On Friday, 7 July 2023 at 10:45:33 UTC, Guillaume Piolat wrote:
> On Friday, 7 July 2023 at 09:35:14 UTC, Paolo Invernizzi wrote:
>>
>> I respectfully disagree, and prefer to keep going on with the current deprecation and cleanup policy: Scott Meyers' DConf 2014 keynote all the way down.
>
> +1
>
> I've always agreed with the deprecation in the end, even complex numbers.
> alias this was a relatively bad idea, even if an iconic feature.
> I don't remember people from outside the community being impressed by alias this.
> We have the right to backtrack on bad ideas instead of keeping them forever.
> The __traits changed feature was aout fixing an incorrect behaviour. It took 10 min to fix.
> The current deprecation system is very good.

I agree with these two messages.
July 08, 2023
On Friday, 7 July 2023 at 10:45:33 UTC, Guillaume Piolat wrote:

> I don't remember people from outside the community being impressed by alias this.
> We have the right to backtrack on bad ideas instead of keeping them forever.

I don't know why anybody should be impressed, but Zig and Jai, the two closest competitors of D, both have a generalized version of 'alias this' ('usingnamespace' and 'using', respectively).
July 08, 2023
On Friday, 7 July 2023 at 22:41:38 UTC, Walter Bright wrote:
> The problem has a lot to do with people wanting to use 3rd party libraries, and it being impractical to upgrade those libraries when the maintainer of those libraries is no longer active. If a user's project depends on several such libraries, it places an undue burden on the user.

The third party import is the biggest pain, and compiler versions/deprecations add to it. As another mentioned it is sort of a dub problem.

As a user of the third party library I want my code strict, but I just want the third party to build as it was written. This has two main implication, does the compiler I'm using even know about the features the library uses, and if the library author instructed the compiler to be strict (I don't care)

If the library is built with a newer compiler version their isn't much to be done but upgrade the compiler. This has the implications where I would now want to compile my code without strictness (hopefully for a short period).

If the compiler has removed features then the library can't be built. This is were keeping functionality is beneficial.

If the compiler depricates functionality then I don't want to hear about. Though it would be good to know "library x is using deprecated functionality". This is where the compiler and dub need to work together. Dub can build my code with strict error and the the compiler provides a flag dub uses to build the third party libraries.
July 09, 2023
On Friday, 7 July 2023 at 12:34:50 UTC, Hipreme wrote:
> The problem right now, from my POV, is that people such as Grim is using dub dependencies. What that generates is that by the default functionality being showing the deprecation messages is that we need to modify unmaintained 3rd party code. How we use 3rd party code right now? DUB. The problem is that dub doesn't have a flag for keeping 3rd party code shut. So, in MY VIEW, dub should be the one to address that problem, not the D compiler itself.

I don't know how dub would address this problem by itself, but this is the number one issue that keeps me from using D as my primary personal language. And I agree that it's third party libraries that are an issue. I mean I have some old D1 code using Tango, but other than that, I do not have issues upgrading my own code. I don't like that it breaks, but if it were only my code that broke, I would use it as my primary language for personal projects.

After some discussion with Adam a few years ago, I heavily limited the libraries I use and I don't have this issue nearly as much anymore, but what it means is I am less likely to reach for D on a project, especially for something like a game where I would need third party libraries. And when I'm far more familiar with 3 other languages and tool chains, I don't reach for it for many of the 1-hour projects either. Although, I did do the timed programming course for a new job in D. :D

In short, if I could count on libraries the same as I do in C# and Java and, to a lesser extent, C, I wouldn't associate "new project in D" and "will take forever" in my mind and I would start by trying to make it work in D, like I used to.
July 09, 2023

On Friday, 7 July 2023 at 13:19:51 UTC, Nick Treleaven wrote:

>

Changing the syntax just for an obsolete feature would send the wrong message.
[...]
cent and ucent are already an error as of 2.100. Were they even implemented?

Clearly you're not looking at this the same way as me, or Walter.
Fixing old code isn't the only upside to resurrecting old features.

First thing, I think all languages should support binary, octal, decimal and hexadecimal literals as a baseline. Octal is probably the least important of them, but can still be plenty useful in its own right. You technically don't need any numerical literals at all in D, you could make all of them with string-to-number templates. You could take such an approach to just about everything in D, actually! On the other hand, people working on low-level Linux code might be pretty appalled to find out that they can't simply use octal literals to represent file permissions in D.

Second, I think re-examining and sometimes resurrecting features that were removed from D, no matter how long ago, is important.
Think about it this way, the only reason D doesn't have octal literals right now is because when it did have octal literals the syntax was ambiguous. The solution at the time was removing them from the language, but had their syntax been modified at the time then they wouldn't have been ambiguous. Who says it's too late?

There are a few D features that were poorly implemented (or not implemented at all), and then simply removed instead of being fully reconsidered. You might say that for many, they were indeed reconsidered, and then added to Phobos instead. Now some of these features pre-date BetterC, of course, but I am a regular BetterC user. A feature being moved to Phobos translates to "you don't get to use this in most of your code anymore" for me. I'm not a user of complex or imaginary types, but I don't see why they needed to be removed from D, were they a huge burden to maintain compared to being in Phobos?

TL;DR I think we should be more lenient about leaving features in the language if they aren't in the way, and consider ways of modifying them rather than removing them from the language if they get in the way.

July 09, 2023

On Sunday, 9 July 2023 at 18:51:01 UTC, IchorDev wrote:

>

[...]

I felt that I should also clarify that there are some features that should stay dead, for our benefit. I figured I'd name a few.

  1. Bugs that some people treated like features. There's a few listed among D's deprecated features.
  2. body—find-and-replace is enough to update it, and body shouldn't be a keyword.
  3. C-style function pointers. They are absolutely horrid; so hard to read that it hurts.
  4. Escape-string literals seem to have been designed to confuse people, much like
  5. implicit string concatenation.
  6. De-referencing arrays with *.
  7. Comma expression results. Tuples & deconstruction instead would be nice!

Most of these changes don't really prevent you from doing things you could previously do with the base language (like removing class alias this), they syntax clean-up that you can mostly update to with a rudimentary regex or a bit of manual error-pecking.

P.S. "error-pecking" as in "build, try to fix any compiler errors, rinse, repeat".

July 12

On Sunday, 9 July 2023 at 18:51:01 UTC, IchorDev wrote:

>

On Friday, 7 July 2023 at 13:19:51 UTC, Nick Treleaven wrote:

>

Changing the syntax just for an obsolete feature would send the wrong message.
[...]
cent and ucent are already an error as of 2.100. Were they even implemented?

Clearly you're not looking at this the same way as me, or Walter.
Fixing old code isn't the only upside to resurrecting old features.

I thought Walter was asking for features that should be changed from deprecated to obsolete, it seems I was wrong.

>

First thing, I think all languages should support binary, octal, decimal and hexadecimal literals as a baseline. Octal is probably the least important of them, but can still be plenty useful in its own right.

Generally programmers can count in binary and decimal, hex somewhat. Not octal.

>

You technically don't need any numerical literals at all in D, you could make all of them with string-to-number templates. You could take such an approach to just about everything in D, actually! On the other hand, people working on low-level Linux code might be pretty appalled to find out that they can't simply use octal literals to represent file permissions in D.

Maybe because they're used to working in languages that don't have D's CTFE abilities. Octals are still rare. There are other literals, not all literals can be supported in the language. So the better solution for less common literals is to embrace the library pattern and dogfood it. C++ has user-defined literal support. D doesn't need that.

...

>

There are a few D features that were poorly implemented (or not implemented at all), and then simply removed instead of being fully reconsidered. You might say that for many, they were indeed reconsidered, and then added to Phobos instead. Now some of these features pre-date BetterC, of course, but I am a regular BetterC user. A feature being moved to Phobos translates to "you don't get to use this in most of your code anymore" for me.

octal could have been added to druntime, or you can copy the code. For betterC there's probably quite a lot of stuff in Phobos that works with betterC, so that is a general problem.

>

I'm not a user of complex or imaginary types, but I don't see why they needed to be removed from D, were they a huge burden to maintain compared to being in Phobos?

It depends whether you value language simplification and dogfooding.

1 2 3
Next ›   Last »