Live data from Hacker News

Soursop and Ponies in Kona: A C++ Committee Trip Report

cor3ntin.github.io

21–30 of 69 posts

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#21
post #19

Earlier quoted context omitted.

CppFront compiles to C++ and everything is intended to map to clean usable C++ code so that if the project fails, the code is still salvageable in its C++ form. It's not intended as a separate language.

I can do the same with Eiffel, so is Eiffel C++'s future?

I think you're removing all context and constructing a false equivalency

According to wikipedia, Eiffel was created in 1986, making it a contemporary with C++'s initial development. From what I can tell, it's creator had no affiliation with the development of C/C++, and it was created for reasons completely unrelated to C++.

CppFront was created by the C++ committee chairman for the explicit goal of providing a path forward for C++. Herb explicitly stated that the inspiration for using C++ as a compilation target was taken from Bjarne's initial implementation of C++, which compiled to C.

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#22
post #7

Still hoping for compile time introspection/reflection for class serialization. Whichever language implements it first (C++ or other) I'm all in on. I come from a scientific background, where running code on data gathering machines, and writing it out, then reading it back in later for analysis is 90% of what I do.

You can do this with Haskell (aeson package) and maybe with Rust (serde?)

Java annotations have enabled compile-time reflection since Java 6, and of course it has been used for serialization: https://github.com/square/moshi/#codegen

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#23
post #21
post #19

Earlier quoted context omitted.

I can do the same with Eiffel, so is Eiffel C++'s future?

I think you're removing all context and constructing a false equivalency According to wikipedia, Eiffel was created in 1986, making it a contemporary with C++'s initial development. From what I can tell, it's creator had no affiliation with the development of C/C++, and it was created for reasons completely unrelated to C++. CppFront was created by the C++ committee chairman for the explicit goal of providing a path…

Nope, I am making a point that plenty of languages have as goal to compile to C++, Eiffel was only an example from many others I could have chosen from.

The way Herb Sutter tries to sell Cppfront, versus all those other languages that have backends capable of generating C++, is exactly that, as ISO C++ chairman he is trying to portray Cppfront isn't like the others, given his position.

Hasn't as it is, he would use the same terms as the Carbon and Val folks.

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#24

I would love to see a world in which a system is designed and built from multiple languages, so that the "right" tool could be used for each part. Does this even make sense? The modern distributed web seems to be leading us there. Slowly, slowly. I would also love to see a world where all C, C++ dependencies magically port themselves to Rust without FFI or a first-cut rewrite that a hobbyist did. 10-20 years maybe? U…

>"I would also love to see a world where all C, C++ dependencies magically port themselves to Rust without FFI or a first-cut rewrite that a hobbyist did. 10-20 years maybe?"

10-20 years sound as a pipe dream.

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#25
post #7

Still hoping for compile time introspection/reflection for class serialization. Whichever language implements it first (C++ or other) I'm all in on. I come from a scientific background, where running code on data gathering machines, and writing it out, then reading it back in later for analysis is 90% of what I do.

Rust basically supports this with pretty low complexity via serde, but I think many developed languages have at least something to do this, although in some it has to be hacked on.

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#26

Earlier quoted context omitted.

CppFront is a different project entirely. It's like saying C++ is C's future

CppFront compiles to C++ and everything is intended to map to clean usable C++ code so that if the project fails, the code is still salvageable in its C++ form. It's not intended as a separate language.

Exactly what C++ to C at the beginning https://en.m.wikipedia.org/wiki/Cfront

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#27
post #7

Still hoping for compile time introspection/reflection for class serialization. Whichever language implements it first (C++ or other) I'm all in on. I come from a scientific background, where running code on data gathering machines, and writing it out, then reading it back in later for analysis is 90% of what I do.

Reflection is definitely a big topic of discussion, but I'm not sure whether it will make it in time for the finalization of the C++23 spec. I think this is the most recent iteration of the proposal:

https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2022/p12...

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#28
post #7

Still hoping for compile time introspection/reflection for class serialization. Whichever language implements it first (C++ or other) I'm all in on. I come from a scientific background, where running code on data gathering machines, and writing it out, then reading it back in later for analysis is 90% of what I do.

I’m pretty sure D supports this.

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#29
post #18
post #5

Herb's CppFront looks like the best hope for a clean C++ future

If anything, Circle would be it. CppFront is just like Carbon and Val, with a completly different syntax, translating to C++ is just an implementation detail, he just markets in a different way given his position at ISO, most likely not to raise too many waves.

Not really, we as a community know already that the best way to significantly change a language by keeping full compatibility is to write a preprocessor (CppFront way).

Carbon is DOA as it hacks a compiler, and Circle isn't even in active development (again if it would compile to C++ that would be a better direction).

At the same time putting ideas from Carbon to CppFront is possible (I wish Carbon developers would also think about going the preprocessing direction).

Re: Soursop and Ponies in Kona: A C++ Committee Trip Report

#30
post #7

Still hoping for compile time introspection/reflection for class serialization. Whichever language implements it first (C++ or other) I'm all in on. I come from a scientific background, where running code on data gathering machines, and writing it out, then reading it back in later for analysis is 90% of what I do.

I’ve done this with libclang: parsing C++ with clang.cindex in Python, walking the AST for structs with the right annotation, and generating code to serialize/deserialize. All integrated into a build system so the dependency links are there. Obviously being built into the language would be way better, but if I was spending 90% of my time I would take any necessary steps.

Interested in sharing any code? This will be useful to many C++ devs who need any sort of reflection in their workflow (especially for gamedevs)
Post reply on HN