←back to thread

The C23 edition of Modern C

(gustedt.wordpress.com)
515 points bwidlar | 5 comments | | HN request time: 0.839s | source
1. uvas_pasas_per ◴[] No.41859204[source]
I've been using modern C++ for a personal project (a language interpreter) for the last year+. I constantly think of switching to C, because of the mental burdens of C++, and because of the problems with tooling (Visual Studio's IntelliSense still barely works, because I use C++20 modules), and compile times get ugly because of the way the language failures force so much into interfaces (even with modules). But on the flip side I've gotten so used to classes, member functions, generic programming (templates), namespaces... I may be hooked.
replies(1): >>41860494 #
2. fluoridation ◴[] No.41860494[source]
I've been using C++ for the longest time, and I would never give up destructors to switch to C.

For your particular use case, have you considered C#? VS works much more nicely with it.

replies(1): >>41861398 #
3. uvas_pasas_per ◴[] No.41861398[source]
Yeah, I did. I want something low level and cross platform, including mobile. I think when I tried the C# for iOS stuff, nothing worked. But it's probably too much VM/runtime for me anyway, for this project.
replies(2): >>41861906 #>>41862358 #
4. fluoridation ◴[] No.41861906{3}[source]
Fair enough. I would've used C++ as well.
5. neonsunset ◴[] No.41862358{3}[source]
iOS C# is more or less fine, there is quite a bit of work done in .NET to make this better still. .NET 9 gains native Swift Library Evolution ABI support even - you can literally declare DllImports against public Swift APIs by simply annotating them with [typeof(CallConvSwift)], it's not as convenient as it sounds but it's only a matter of time when the tools like https://github.com/royalapplications/beyondnet adopt this. It's going to get much better once MonoAOT is replaced with NativeAOT for all major publish modes for iOS.