4 ms·
Could you give or point to some examples?
by fiter 7y ago
Could you give or point to some examples?
- pron 7y agohttps://kristoff.it/blog/what-is-zig-comptime/ https://kristoff.it/blog/what-is-zig-comptime/
- lostmsu 7y agoDamn it looks good. I wish it could target and consume .NET or Java.
- unwind 7y agoWhat 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?
- lostmsu 7y agoCorrect 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.
- pjmlp 7y agoNot 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.
- pron 7y agoJIT compilers already do something like that automatically.