digitalmars.D - cppfront (Herb Sutter's idea in CppCon)
- XavierAP (10/10) Nov 13 2022 Anyone watched it already? What do you think?
- Nick Treleaven (3/4) Nov 13 2022 This was discussed here in September:
- norm (6/16) Nov 13 2022 and the Rust marketing machine cogs turn once more...Rust did not
- XavierAP (30/35) Nov 14 2022 It looks to me that (competing against) Rust must be the reason
- Olivier Pisano (3/8) Nov 14 2022 It enables syntax for functions to be the same as for lambdas,
Anyone watched it already? What do you think? https://youtu.be/ELeZAKCN4tY?t=22m05s https://github.com/hsutter/cppfront Quite an origial idea, while at the same time it looks partially self-defeating in terms of defending C++ (against competition from Rust, which seems to be the motivation). I'm particularly surprised (to be honest, put off) by Herb's choice to make declarations in this new language of his unnecessarily different from C++ in order to make them look like Rust.
Nov 13 2022
On Sunday, 13 November 2022 at 17:14:15 UTC, XavierAP wrote:Anyone watched it already? What do you think?This was discussed here in September: https://forum.dlang.org/post/tfzncabvtbanpzyvufpf forum.dlang.org
Nov 13 2022
On Sunday, 13 November 2022 at 17:14:15 UTC, XavierAP wrote:Anyone watched it already? What do you think? https://youtu.be/ELeZAKCN4tY?t=22m05s https://github.com/hsutter/cppfront Quite an origial idea, while at the same time it looks partially self-defeating in terms of defending C++ (against competition from Rust, which seems to be the motivation). I'm particularly surprised (to be honest, put off) by Herb's choice to make declarations in this new language of his unnecessarily different from C++ in order to make them look like Rust.and the Rust marketing machine cogs turn once more...Rust did not invent that syntax yet people now see it and think of Rust. I think this approach can work for C++. I really like C++ (post C++17) and want to see it improve, same as I really like D and would love to see it take off.
Nov 13 2022
On Sunday, 13 November 2022 at 22:07:41 UTC, norm wrote:and the Rust marketing machine cogs turn once more...Rust did not invent that syntax yet people now see it and think of Rust. I think this approach can work for C++. I really like C++ (post C++17) and want to see it improve, same as I really like D and would love to see it take off.It looks to me that (competing against) Rust must be the reason why this syntax is chosen. I didn't say and I didn't think Rust invented it -- though I don't really know where it comes from originally, or how to call it. Disclaimer: I don't use Rust. It occurs to me the syntax may make it easier for cppfront to identify parts of the code that it needs to compile and others to leave alone. In any case requiring it to handle mixed source with cpp and cpp2 in the same file, as it does now for the few features it supports, sounds really challenging in the long term. Otherwise as I said, choosing this syntax looks to me very questionable, and likelier to push people away from C++ than attract them. Not to mention pushing away existing C++ programmers. It's like admitting defeat, that C-like syntax is worse. Of course you want to automate and get rid of const auto & const overloads, copy-move Hell etc, this is a different topic and the main benefit that Herb seems to be going after. But as for teaching C++ programmers to declare name: type = instead of type name = etc, is it a good idea? While at the same time claiming that this is meant so that the generated cpp can still be read and maintained on its own if necessary. Anyway other than the syntax, I'm also curious if this approach can work, both in the short and the long terms. If you follow the logic, comparing this, as Herb does, to the first C++ compiler by Bjarne S which was a trans-compiler to C, then the mixed C/C++ period, until the time when C and C++ have become completely separate languages, is this the success that Herb would be going after in the best of cases, to create a new, different language (and one that looks so different)?
Nov 14 2022
On Monday, 14 November 2022 at 13:57:34 UTC, XavierAP wrote:Of course you want to automate and get rid of const auto & const overloads, copy-move Hell etc, this is a different topic and the main benefit that Herb seems to be going after. But as for teaching C++ programmers to declare name: type = instead of type name = etc, is it a good idea?It enables syntax for functions to be the same as for lambdas, eliminating a special case, so yes, it is a good idea.
Nov 14 2022