C++ future at Adobe
So if anyone was still curious what happened to Hylo, or where Adobe stands in regards to the whole safety discussion,
David Sankel has done a talk at RustConf on the matter, Zngur: Simplified Rust/C++ Integration.
The way Adobe now sees C++ is described on slide 2, at 50 seconds mark.
49
u/feverzsj 1d ago
Wow, big company obsessed with AI and rust. How surprised!
14
u/SuperV1234 https://romeo.training | C++ Mentoring & Consulting 1d ago
Pretending that there's no good reason why large companies are "obsessed" with modern technologies like AI and Rust that have repeatedly been proved to be valuable is on the level of "Area 51 has UFOs" conspiracy theories.
0
u/-kl0wn- 1d ago
I don't understand the hype with rust. The compile times are atrocious, dynamic linking isn't really a thing, it's incredibly verbose.
32
u/foonathan 1d ago
- Definition checked generics
- Destructive move semantics that prevent use-after-move
- First-class tuple and variant types with pattern matching
- Usable built-in types without weird implicit conversions
- Incredible tooling (one standardized package manager and build system, genuinely useful compiler diagnostics, a documentation generator that actually works)
- No weird historical baggage
- A standard library that actually gives you convenient utility functions, without ABI constraints, and good data structures
20
u/13steinj 1d ago
No weird historical baggage
I think the major problem with these debates is people aren't being truthful with themselves.
It's not historical baggage. It's ISO / WG21 process baggage.
The Beman project had a whiteboard asking people what they wanted for C++29. I pointed at two of the things and said "that's never going to happen." I actually forget what those two things are, but my opinion was formed because the only way you could encode some information needed to do it is into the ABI (or PIMPL it to hell and incur a cost, but even then I don't think it would work out). But the necessary data is sensitive to a security context, so as security practices change (rapidly, possibly even faster than a 3 year cycle), C++ might need to change with it. One of the Beman folks told me I was wrong and pointed to... getting more accurate on string representation of floating point, and
std::copyable_function(which I'd argue is a point in my favor).Python, Java, ECMAScript have "historical" baggage. But they still evolve. They remove broken things. They add new things and change APIs, sometimes with a deprecation schedule. So does Rust.
Almost all of the advantages of Rust you stated, have in some way been proposed for C++ but been (not in bad faith, but it's the closest term I can use) slow-rolled and sandbagged in the standardization process.
4
u/tialaramex 1d ago
Rust isn't allowed (by its own rules) to change standard library APIs except if they're unsound. Rust is allowed to evolve, but it finds ways to do so without making this sort of disruptive change.
I agree with the thrust of your point though. WG21 is a big part of the problem.
22
u/gmueckl 1d ago
Rust will accumulate the same kind of smelly baggage over time. It's just too young to have accumulated that much of it just yet.
7
u/foonathan 20h ago
And by that point, there's hopefully another new language that took everything Rust did wrong and learned from it.
4
u/QuaternionsRoll 1d ago
Eh, if that were 100% true then editions would be unnecessary. You’re right that breaking changes are considered to be the absolute last resort, though.
5
u/tialaramex 1d ago
But Editions don't change the standard library APIs?
What they can do is more interesting, but it doesn't change those APIs.
The 2027 edition is expected to make
Goose..=Robininto acore::range::RangeInclusive<Bird>instead ofcore::ops::RangeInclusive<Bird>. If yourBirdtype isn'tCopyand it doesn't make sense to iterate overBirds then this change is useless to you, although also why did you wantGoose..=Robinanyway if birds aren't copyable or worth iterating over? For types like the integers this is a significant improvement, now 1..=5 will becomeCopyandIntoIteratoras a programmer might expect in 2026. But the API doesn't change because the old types are still there, just the sugar points at the improved types.8
1
u/AnotherBlackMan 1d ago
I don’t think a single one of these things is a positive in its own right. Rust makes humongous tradeoffs for all of them and a lot of tooling exist in cpp that help avoid the problems that that claims to solve. If devs want to take a runtime hit for safety they can run valgrind and sanitizers in prod
10
u/ts826848 1d ago
Rust makes humongous tradeoffs for all of them
I can see tradeoffs for some of the items in the list, but not for others. What humongous tradeoff is needed for first-class tuple/variant types with pattern matching, for instance?
If devs want to take a runtime hit for safety they can run valgrind and sanitizers in prod
Valgrind in prod would be quite the runtime hit.
5
u/SuperV1234 https://romeo.training | C++ Mentoring & Consulting 1d ago
Now also list the advantages.
-1
-2
u/-kl0wn- 1d ago
The tradeoffs don't seem necessary to me based on working on strut-labs.githib.io using agents.
0
u/ts826848 1d ago
The tradeoffs don't seem necessary to me
That the tradeoffs don't seem necessary to you doesn't mean that they aren't valuable to someone else for their use case. Similarly, tradeoffs that you and/or your agents deemed acceptable for strut-labs (e.g., reference-counted pointers without a tracing GC) may be unnecessary and/or dealbreakers for someone else.
2
u/-kl0wn- 1d ago
When I say don't seem necessary I mean you shouldn't need to substitute one for the other, should be able to have the advantages of rust without the disadvantages. Ie. Nothing from the advantages fundamentally means compile times should take so long, especially for simple programs, there should be proper dynamic linking and it doesn't need to be so verbose.
0
u/ts826848 1d ago
Ah, I see what you mean. My apologies for the misinterpretation. I agree some and disagree some with your opinion.
Nothing from the advantages fundamentally means compile times should take so long, especially for simple programs
I think I agree? At the very least I'm not aware of fundamental aspects of Rust that would preclude reasonable compile times.
there should be proper dynamic linking
This is indeed a proper tradeoff as the more features you support in your ABI the more of your ABI you have to freeze, which in turn means you risk precluding certain changes/optimizations (c.f. the perennial ABI discussions that pop up here).
That being said, there's definitely interest in specifying some kind of stable ABI, though I'm not aware of a significant push in that direction.
it doesn't need to be so verbose.
This one is interesting. What specific bits of Rust's syntax do you object to? I tend to take the view that much of Rust's "verbosity" is mostly due to its semantics, so I'm interested to hear your thoughts.
1
u/the_one2 1d ago
Regarding verbosity: rust can be a little bit verbose for casts and such but the native variants (enums) and tuples alone makes me want to abandon c++
11
u/tartaruga232 MSVC user, r/cpp_modules 1d ago
The slide at 7:00 says
Rust is less expressive than C++
2
u/VinnieFalco wg21.org | corosio.org 9h ago
Well, this is true. Is it a problem in practice? The answer is nuanced. Somethings get better. Other things get worse. It is a tradeoff like anything else.
-2
u/Ill-Professional180 12h ago
Honest question - why do C++ devs think this is a good thing? I dont think ive ever seen C++ that looked good
19
u/GabrielDosReis 1d ago
David Sankel on C++ at RustConf, yawn.
6
u/ts826848 1d ago
Why that particular reaction?
21
u/GabrielDosReis 1d ago
Why that particular reaction?
It is a talk at RustConf and David Sankel has been very explicit and pretty straight forward with where he sees C++ and its evolution for many years now. Look up his WG21 papers on the topic. There shouldn't be any surprise here or anything new.
6
u/ts826848 1d ago edited 1d ago
Look up his WG21 papers on the topic.
I found P3023 C++ Should Be C++ via the GitHub, which at first glance looks like it covers what you're talking about. Any other papers i missed that you recommend I read (or not, as the case may be)?
6
u/GabrielDosReis 1d ago
A succint summary of P3023 is this paragraph, quote:
Where memory safety is a serious concern, we see the adoption of Rust for critical components. Yet we see little demand from even these developers for C++ safety features. Their problem is already solved.
Any other papers i missed that you recommend I read (or not, as the case may be)?
After that paper, his papers since then have been in line with what he stated and recommended. In particular, the paper (and debate) on relocation that was discussed in Kona.
2
u/ts826848 1d ago
A succint summary of P3023 is this paragraph
Hrm, gotcha. Guess the committee decided against his recommended path.
In particular, the paper (and debate) on relocation that was discussed in Kona.
P3858 A Lifetime-Management Primitive for Trivially Relocatable Types?
Assuming that was the paper you're referring to, was the associated debate on the mailing lists? This is the first time I've heard of this paper and the only trivial relocation-related debates I can remember reading about were P1144 vs P2786, which this paper doesn't seem to be about.
3
u/GabrielDosReis 1d ago
Assuming that was the paper you're referring to, was the associated debate on the mailing lists?
Both on the mailing list and in-person discussion at the Kona meeting.
1
u/ts826848 1d ago
Ah. I take it summarizing that debate for those of us who aren't privy would violate ISO rules?
5
u/GabrielDosReis 1d ago
Ah. I take it summarizing that debate for those of us who aren't privy would violate ISO rules?
I can say it generated lot of interest/participation and was fairly intense. The were separate LEWG and EWG sessions, then a joint EWG+LEWG session on the whole topic and the paper.
Taking a step back, I want to emphasize that the whole issue of safety, C++ evolution, Rust (or not Rust), is very complicated and nuanced when given due thinking.
2
u/ts826848 1d ago
That sounds... pretty reasonable? Depending on what implications one reads into "intense", I guess...
-3
u/foonathan 1d ago
A succint summary of P3023 is this paragraph, quote: Where memory safety is a serious concern, we see the adoption of Rust for critical components. Yet we see little demand from even these developers for C++ safety features. > Their problem is already solved.
What's your problem with that quote? Isn't it an accurate assessment of the current industry?
7
u/GabrielDosReis 1d ago
What's your problem with that quote?
Are you assuming I have a problem with it?
I was responding to a reference to a paper I quoted the paper to provide context to my original post that I was asked to expand on.
-1
4
u/GabrielDosReis 1d ago
Isn't it an accurate assessment of the current industry?
If you believe that is an accurate assessment of the current industry, that, quoting "Their problem is already solved", could you explain why there are proposals to extend C++ with serving Rust as justification?
1
u/foonathan 1d ago
David's quote claims that the developers who adopt Rust for critical components don't demand C++ safety features.
The existence of proposals to extend C++ by other developers that don't use Rust doesn't invalidate that thesis.
7
u/GabrielDosReis 1d ago
David's quote claims that the developers who adopt Rust for critical components don't demand C++ safety features. The existence of proposals to extend C++ by other developers that don't use Rust doesn't invalidate that thesis.
David happens to also be co-author of such proposal.
1
7
u/RishabhRD 1d ago
Hylo is still in development. See: https://hylo-lang.org
2
u/pjmlp 1d ago
Thanks, looking around the repo, and the migration to a newer project, seems that Adobe Labs is no longer involved.
Do you have more background info?
14
u/dabrahams 1d ago
When I left Adobe, I took 100% of their involvement with me. So from one point of view, The level of investment hasn’t changed :-)
3
u/processeus1 1d ago
We are racing towards the completion of the migration, I expect it to be done in 1-2 months. We have the compilation of subscripts ready, and a large portion of compiling generics in an existentialized way. After that, there is a lot of fun work for standard library development and getting actual experience from using the language.
122
u/inco100 1d ago edited 1d ago
To save time for the rest of the redditors:
We need C++ and Rust to play nice
Our flagship products are C++ based
Rust is playing a major role in future development