News for hackers. Stuff that matters.
Re:C++20 Reference Card by fiter on Wednesday January 29, 2020 @01:18PM (#22183939)
Could you give or point to some examples?
Re:C++20 Reference Card by pron on Wednesday January 29, 2020 @01:20PM (#22183978)
Re:C++20 Reference Card by lostmsu on Wednesday January 29, 2020 @01:50PM (#22184362)
Damn it looks good. I wish it could target and consume .NET or Java.
Re:C++20 Reference Card by unwind on Wednesday January 29, 2020 @03:24PM (#22185398)
What does that even mean?

"Target" I guess could mean that it could compile to code for those virtual machines? That would make some sense although for a language that sets out to compete with/replace C it would be a bit strange.

For "consume" I don't know ... do you mean "call into", or something?

Re:C++20 Reference Card by pjmlp on Thursday January 30, 2020 @04:50AM (#22190171)
Not strange at all, apparently many still aren't aware that C++/CLI exists.

CLR was designed from the start to support C++.

Back in the 2000, "Everything.NET" Microsoft, there was the goal of having everything on top of .NET, it just did not play out that way due to the endless Windows/Office vs .NET politics across MS teams.

Using C++/CLI is much more productive for interop than manually writing P/Invoke declarations.

Or using C++/WinRT to wrap C++ API into COM/UWP libraries.

Likewise on Java, microEJ and Android world, with Android Studio, Eclipse, Netbeans and Oracle Studio you can easily do mixed language development and debugging with C and C++.

Any systems programming language that wants a place at the table on these platforms, needs to cover these workflows as well as C++ does.

Re:C++20 Reference Card by lostmsu on Wednesday January 29, 2020 @04:21PM (#22185977)
Correct on both cases.

With .NET I'd love integration with existing types and generics too.

Actually, I was just thinking aloud. I don't really mean for Zig authors to target .NET, but rather have .NET Core runtime and C# to have the concept of compile-time values and types.

Re:C++20 Reference Card by pron on Wednesday January 29, 2020 @04:34PM (#22186093)
JIT compilers already do something like that automatically.