Live data from Hacker News

Towards a more powerful and simpler C++ with Herb Sutter

blog.jetbrains.com

11–20 of 63 posts

Re: Towards a more powerful and simpler C++ with Herb Sutter

#11
post #6
post #5

Earlier quoted context omitted.

Its so much simpler :)

I agree, but $ doesn't make the language way more uglier than what it is now?

I don't see why, unless you have something particularly against the $ symbol? It seems to fit with existing syntax quite well, e.g. & gives the address of a thing, $ gives the reflection of a thing. Extending that to define a metaclass seems pretty natural.

Re: Towards a more powerful and simpler C++ with Herb Sutter

#12
post #10
post #2

Are they really going to add $ to C++? Unbelievable. What was wrong with "reflexpr"? It is way more C++'ish than "$". Update: From Herb's blog : "Also, a vocal minority in the committee strongly want a syntax that does not include the $ character (not just for $class, but also for $expr reflection) because they have large code bases that use $ in source code that is not C++ code but is processed to emit C++; removing…

It's still up in the air I think - you can see from his blog[1] that others in the the committee prefer a syntax more like meta::type interface(const meta::type source) { // … basically same code … }; [1] https://herbsutter.com/2017/07/26/metaclasses-thoughts-on-ge...

Thank you, I didn't know that. This syntax makes much more sense. Considering C++ style programming.

I am very interested in having Reflection in C++. But tbh $ makes it really awkward.

Re: Towards a more powerful and simpler C++ with Herb Sutter

#13
Jonathan Blow (cult/indie game developer/studio owner) has a lot of ideas about evolving C++ (or rather, building a new language to replace it) specifically in a game industry context. This perspective is interesting because its kind of running at a different angle away from the "memory-safe, better guarantees" project that Rust is workin on.

https://www.youtube.com/watch?v=TH9VCN6UkyQ

Just as the scripting languages took a big bite out of C/C++ usage starting in the 90s, I think we're seeing another couple use-case for C/C++ pull off:

1) stuff that is performance sensitive but security sensitive as well (Rust) 2) stuff that is soooo performance sensitive that Rust and C++ are actually too bloated, but which isn't really security sensitive so the guarantees that Rust/Modern C++ offer aren't worth it (Jai, Blow's language).

Category 1 is clearly real, but Category 2 might be too small to sustain itself (though Blow makes an economic argument that it would be worth it).

Are we just going to keep peeling back C/C++ users from the pack with more specifically-useful languages until there are none left except for those maintaining legacy code? Or are there use-cases where C++ will continue to make sense?

I guess a lot of this depends on whether or not we can meaningfully "modernize" C++ through the standards process without simply bolting on a lot more features that add to the bloat. I wouldn't wager much that this trick can be pulled off.

Re: Towards a more powerful and simpler C++ with Herb Sutter

#14
post #13

Jonathan Blow (cult/indie game developer/studio owner) has a lot of ideas about evolving C++ (or rather, building a new language to replace it) specifically in a game industry context. This perspective is interesting because its kind of running at a different angle away from the "memory-safe, better guarantees" project that Rust is workin on. https://www.youtube.com/watch?v=TH9VCN6UkyQ Just as the scripting languages…

As Ex-Gamedev I don't buy that #2 is too bloated for C++, you just have to be smart about what features you pick.

Really though for what he wants to do you want a flexible framework(scripting language) backed by a fast engine(native). Jai sounds pretty interesting but I don't know if Blow has the interest in building an ecosystem around it or just using it for his own projects.

FWIW my ideal use case is Lua + Rust. I've done it on a few projects so far and really love the combo of flex + stability.

Re: Towards a more powerful and simpler C++ with Herb Sutter

#15
post #13

Jonathan Blow (cult/indie game developer/studio owner) has a lot of ideas about evolving C++ (or rather, building a new language to replace it) specifically in a game industry context. This perspective is interesting because its kind of running at a different angle away from the "memory-safe, better guarantees" project that Rust is workin on. https://www.youtube.com/watch?v=TH9VCN6UkyQ Just as the scripting languages…

I went back and forth over email with Jonathan Blow a while back and my opinion is that C++ is moving in a direction where it addresses most of his concerns about its suitability for game programming, though he doesn't agree. I wrote a few blog posts elaborating on why, starting with: http://blog.mattnewport.com/why-c17-is-the-new-programming-l...

I should revisit the topic in light of the latest progress with C++ and to correct some errors in those posts but I continue to believe that C++ is getting better as a language for games.

There is a somewhat legitimate argument that C++ is too complex but I don't believe you can make a convincing case that it justifies creating a whole new language (which will inevitably come with its own quirks, idiosyncracies and complexities) rather than engaging with the development of C++ itself.

Re: Towards a more powerful and simpler C++ with Herb Sutter

#16
post #13

Jonathan Blow (cult/indie game developer/studio owner) has a lot of ideas about evolving C++ (or rather, building a new language to replace it) specifically in a game industry context. This perspective is interesting because its kind of running at a different angle away from the "memory-safe, better guarantees" project that Rust is workin on. https://www.youtube.com/watch?v=TH9VCN6UkyQ Just as the scripting languages…

I'm suspicious about your so called (runtime) slow bloat. learning/understanding bloat, sure, compile time bloat, sure. But execution wise? I would like examples, specifically some that could not be dodged in a trivial manner

Re: Towards a more powerful and simpler C++ with Herb Sutter

#17
post #13

Jonathan Blow (cult/indie game developer/studio owner) has a lot of ideas about evolving C++ (or rather, building a new language to replace it) specifically in a game industry context. This perspective is interesting because its kind of running at a different angle away from the "memory-safe, better guarantees" project that Rust is workin on. https://www.youtube.com/watch?v=TH9VCN6UkyQ Just as the scripting languages…

> 2) stuff that is soooo performance sensitive that Rust and C++ are actually too bloated, but which isn't really security sensitive so the guarantees that Rust/Modern C++ offer aren't worth it (Jai, Blow'

If you expect Jai to be faster than C++ I think you will end up disappointed. There isn't much reason there should be any more performance disparity than Clang and a different C++ compiler. The only language that I think could be really be called faster than C++ is ISPC.

Re: Towards a more powerful and simpler C++ with Herb Sutter

#18
post #13

Jonathan Blow (cult/indie game developer/studio owner) has a lot of ideas about evolving C++ (or rather, building a new language to replace it) specifically in a game industry context. This perspective is interesting because its kind of running at a different angle away from the "memory-safe, better guarantees" project that Rust is workin on. https://www.youtube.com/watch?v=TH9VCN6UkyQ Just as the scripting languages…

I don't think this is specifically a C++ problem, I think it's a problem for any language which tries to be generalist and encompass many use cases without finding a well-defined niche. Namely, the compromises that a language makes in order to appease wildly divergent use cases will make it less than optimal at many of them, and if demand is high enough for any one of those use cases, then a different language that is custom-tailored for that use case will start to find a foothold.

I think of it like bicycling: one could use the same bike for commuting, road racing, mountain biking, and BMX, and you'd certainly save room in your garage, but most people do not need to do all four of those activities and will instead invest in bikes that make tradeoffs to excel in the use cases that they actually care about.

Re: Towards a more powerful and simpler C++ with Herb Sutter

#19
post #13

Jonathan Blow (cult/indie game developer/studio owner) has a lot of ideas about evolving C++ (or rather, building a new language to replace it) specifically in a game industry context. This perspective is interesting because its kind of running at a different angle away from the "memory-safe, better guarantees" project that Rust is workin on. https://www.youtube.com/watch?v=TH9VCN6UkyQ Just as the scripting languages…

I went back and forth over email with Jonathan Blow a while back and my opinion is that C++ is moving in a direction where it addresses most of his concerns about its suitability for game programming, though he doesn't agree. I wrote a few blog posts elaborating on why, starting with: http://blog.mattnewport.com/why-c17-is-the-new-programming-l... I should revisit the topic in light of the latest progress with C++ an…

Interesting; i think it’s fairly clear by now engaging with C++ is not going to lead to reduced complexity at all. When was the last time it removed support for a feature? That’s not what the language needs because it’s more interested in preserving existing code bases than it is at improving them (the latter being a huge effort, truly massive, so i understand the decision and don’t mean it as a slight in the least).

Re: Towards a more powerful and simpler C++ with Herb Sutter

#20

Earlier quoted context omitted.

I went back and forth over email with Jonathan Blow a while back and my opinion is that C++ is moving in a direction where it addresses most of his concerns about its suitability for game programming, though he doesn't agree. I wrote a few blog posts elaborating on why, starting with: http://blog.mattnewport.com/why-c17-is-the-new-programming-l... I should revisit the topic in light of the latest progress with C++ an…

Interesting; i think it’s fairly clear by now engaging with C++ is not going to lead to reduced complexity at all. When was the last time it removed support for a feature? That’s not what the language needs because it’s more interested in preserving existing code bases than it is at improving them (the latter being a huge effort, truly massive, so i understand the decision and don’t mean it as a slight in the least).

Major influential figures in the C++ community (notably Bjarne Stroustrup and Herb Sutter) are very explicit about having a goal of simplifying everyday usage of C++ (make simple things simple). Watch any of Bjarne's talks over the last few years to see this is one of his main focuses. It's also recognized that backwards compatibility / not breaking existing code are very important however. Yes, that's a hard set of requirements to meet but I find it bizarre when I keep seeing people state that the C++ standards committee and the community in general don't care about simplicity and ease of use when those are literally the major topics of keynotes at every C++ conference of the last few years.
Post reply on HN