Hacker News new | past | comments | ask | show | jobs | submit login

why is that impt to you? just trying to understand the problem you couldnt solve without a C-like



I want to write C code, not C++ code. Even if I try to write C style C++, it is more verbose and less readable, because of various C++isms. For example, having to specify extern “C” to get sane ABI names for the Nvidia CUDA driver API:

https://docs.nvidia.com/cuda/cuda-driver-api/index.html

Not to mention that C++ does not support neat features like variable sized arrays on the stack.


A neat feature that is so neat Google paid to get it irradicated from Linux kernel, and became optional after C11.


I think you replied to the wrong person.


A strict C variant would indeed be quite nice. I've wanted to write CUDA kernels in Go apps before so the Go app can handle the concurrency on the CPU side. Right now, I have to write a C wrapper and more often than not, I end up writing more code in C++ instead.

But then I end up finding myself juggling mutexes and wishing I had some newer language features.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: