Jump to page: 1 2
Thread overview
Things C++ 20 Deliberately Broke
Sep 25, 2022
Walter Bright
Sep 26, 2022
norm
Sep 26, 2022
Siarhei Siamashka
Sep 26, 2022
ryuukk_
Sep 26, 2022
jmh530
Sep 26, 2022
Don Allen
Sep 26, 2022
Dukc
Sep 26, 2022
jmh530
Sep 26, 2022
M.M.
Sep 28, 2022
German Diago
Sep 29, 2022
Siarhei Siamashka
Sep 27, 2022
norm
September 25, 2022
https://docs.google.com/presentation/d/1HwLNSyHxy203eptO9cbTmr7CH23sBGtTrfOmJf9n0ug/edit?usp=sharing&resourcekey=0-GH5F3wdP7D4dmxvLdBaMvw

https://news.ycombinator.com/item?id=32969957

September 26, 2022
On Sunday, 25 September 2022 at 23:01:52 UTC, Walter Bright wrote:
> https://docs.google.com/presentation/d/1HwLNSyHxy203eptO9cbTmr7CH23sBGtTrfOmJf9n0ug/edit?usp=sharing&resourcekey=0-GH5F3wdP7D4dmxvLdBaMvw
>
> https://news.ycombinator.com/item?id=32969957

I agree with the general sentiment on ycombinator, most of the "breakages" are things deprecated because it plugs a hole in the language. So a Chromium developer is on the migration trail and doesn't like it. Many of the "solutions" are things like "use explicit casts", which is a good thing because it exposes where they are side-stepping the type system to reopen the holes plugged by C++20.

There are two paths; Python2/3 new language or or deprecation like C++ and D. Either way end-users have to walk that migration at some point to upgrade to the new language.
September 26, 2022

On Monday, 26 September 2022 at 03:24:57 UTC, norm wrote:

>

There are two paths; Python2/3 new language

https://www.techrepublic.com/article/programming-languages-why-python-4-0-will-probably-never-arrive-according-to-its-creator/

Python developers discovered that people dislike compatibility breaking
changes. So if a programming language wants to be successful, then
this has to be taken into account.

>

or deprecation like C++ and D.

C++ and D are actually radically different. Older versions of the C++
standard are still supported via the '-std=c++98' or '-std=c++17' option
in GCC (or its equivalent in the other C++ compilers). And C++ is not
unique. For example, Rust also supports different language editions.
If Python developers decided to keep both Python2 and Python3
maintained forever, then it would be similar to C++ and Rust.

D doesn't offer anything like this right now.

>

Either way end-users have to walk that migration at some point to
upgrade to the new language.

End-users don't have to migrate if they still have an option to keep
using the older version of the language standard when compiling their
code. This is very useful for large projects. Chromium developers
are safely staying at C++17 while evaluating C++20. Nobody is pulling
the rug from under their feet.

September 26, 2022

On Monday, 26 September 2022 at 08:32:27 UTC, Siarhei Siamashka wrote:

>

On Monday, 26 September 2022 at 03:24:57 UTC, norm wrote:

>

There are two paths; Python2/3 new language

https://www.techrepublic.com/article/programming-languages-why-python-4-0-will-probably-never-arrive-according-to-its-creator/

Python developers discovered that people dislike compatibility

"Python developers discovered that people who WERE using Python dislike breaking
changes"

Also:

Python developers discovered that by making important breaking changes and overall making all the changes required to improve the language will attract many more people that didn't like Python previously, and gave it a new life, making it the most popular interpreted language on the planet

The people stuck will get replaced, nobody likes to use stuck things, wether we like it or not, it doesn't matter, at some point we will be replaced by a new generation of humans, that's life

Up to us to leave something for them to play with, being stuck doesn't help!

C++20 is trying to make changes to attract new users, whether it'll work or not is another story, i personally believe the changes are not deep enough (still require forward declaration for modules, wich is dumb)

September 26, 2022

On Monday, 26 September 2022 at 08:32:27 UTC, Siarhei Siamashka wrote:

>

[snip]
C++ and D are actually radically different. Older versions of the C++
standard are still supported via the '-std=c++98' or '-std=c++17' option
in GCC (or its equivalent in the other C++ compilers). And C++ is not
unique. For example, Rust also supports different language editions.
If Python developers decided to keep both Python2 and Python3
maintained forever, then it would be similar to C++ and Rust.

D doesn't offer anything like this right now.
[snip]

D has preview/revert switches for some individual behaviors (though to my knowledge, not all deprecations have this). What it doesn't have is a way to combine several of these together based on an individual year/period and automation to switch to a newer edition. Rust has some good tooling for that.

September 26, 2022

On Monday, 26 September 2022 at 12:41:07 UTC, jmh530 wrote:

>

On Monday, 26 September 2022 at 08:32:27 UTC, Siarhei Siamashka wrote:

>

[snip]
C++ and D are actually radically different. Older versions of the C++
standard are still supported via the '-std=c++98' or '-std=c++17' option
in GCC (or its equivalent in the other C++ compilers). And C++ is not
unique. For example, Rust also supports different language editions.
If Python developers decided to keep both Python2 and Python3
maintained forever, then it would be similar to C++ and Rust.

D doesn't offer anything like this right now.
[snip]

D has preview/revert switches for some individual behaviors (though to my knowledge, not all deprecations have this). What it doesn't have is a way to combine several of these together based on an individual year/period and automation to switch to a newer edition. Rust has some good tooling for that.

Rust just released v1.64 of their system. 1018 people contributed to the new release.

D has nothing like that kind of developer horsepower. So we should realize that it may be simply be beyond the project's capacity to provide things, however useful or shiny, that we see in other languages.

D is obviously not my project, but to the extent this hasn't been thought about (I'd guess it has), I'd suggest taking stock of what the project ambitions are. I think of D as kind of the OpenBSD of the programming language world. OpenBSD is not nearly as successful, measured by user count, as Linux. But it's excellent work and serves a very useful purpose in the niche it has established for itself. But they do make compromises because of the limited developer capacity, e.g., they still don't have a unified buffer cache and the file-system is ancient (no COW, no journaling, though they do still support McKusick's soft dependencies).

I see D the same way. In my view, it's a lot better than C or C++. Is it going to replace either of them? Of course not. But there is a community of D users that understands its value and what the D project has accomplished and that appears to be enough for people like Walter to keep the project going, much like the OpenBSD situation. And a major plus for D is that Walter doesn't behave like Theo de Raadt :-)

In previous posts, I've described how D has served me well personally, allowing me to turn some really disgusting C into something manageable. I won't repeat any of that. But I would like to mention that I first tried to do this work in Rust. The big problem is that my main application has some global state; it is simply unavoidable. That application is also single-threaded, because of its nature. Rust has made the decision to assume that all applications are multi-threaded and therefore mutable globals are unsafe. To use them for global state, you end up with your code absolutely littered with "unsafe" blocks. You can try to use interior mutability and/or thread_local! to get around this. Good luck. So what you get is at least as ugly as my original C and with so many unsafe blocks, what about Rust's vaunted safety claims?

I think they should instead have provided an option to state that your code is single-threaded and will remain so, relaxing the stringency about multi-threaded-ness that just doesn't apply. This would allow writing inherently single-threaded code in a much more straight-forward way. But as the language is now, I had an incredibly frustrating experience and abandoned it. I could have made it work, but it was like going from the frying pan into the fire. D was an absolute delight after this experience.

September 26, 2022

On Monday, 26 September 2022 at 19:51:30 UTC, Don Allen wrote:

>

And a major plus for D is that Walter doesn't behave like Theo de Raadt :-)

Indeed, it is one of the virtues of Walter that you don't see him deliberately insulting anyone. That's something that's far from the norm among famous open-source contributors. Theo de Raadt is definitely not alone with shortcomings in that.

September 26, 2022

On Monday, 26 September 2022 at 19:51:30 UTC, Don Allen wrote:

>

[snip]

Rust just released v1.64 of their system. 1018 people contributed to the new release.

[snip...]

Fair points.

September 26, 2022

On Monday, 26 September 2022 at 20:46:49 UTC, jmh530 wrote:

>

On Monday, 26 September 2022 at 19:51:30 UTC, Don Allen wrote:

>

[snip]

Rust just released v1.64 of their system. 1018 people contributed to the new release.

[snip...]

Fair points.

At the same time, Rust v1.60 was released with the help of 299 people, v1.61 with 331 people, v1.62 with 329 people, and v1.63 with 366 people. So until recently, the difference in manpower was certainly significant, but not HUGE. (For comparison, the versions 2.100, 2.099, 2.098, and 2.097 of D were contributed by 41, 100, 62, and 54 contributors.)

I think D can stay a viable language in the future. It does not need to become the most popular language in the world.

September 26, 2022

On 9/25/22 7:01 PM, Walter Bright wrote:

>

https://docs.google.com/presentation/d/1HwLNSyHxy203eptO9cbTmr7CH23sBGtTrfOmJf9n0ug/edit?usp=sharing&resourcekey=0-GH5F3wdP7D4dmxvLdBaMvw

https://news.ycombinator.com/item?id=32969957

From the document:

>

Math between disparate enums is deprecated

Why? Why can't you add one enum to another when they are based on int, as long as it's typed as int?

I'm honestly curious as to the problems this is solving.

-Steve

« First   ‹ Prev
1 2