Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In Rust: `let foo = include_bytes!("path/to/file")`. And people wonder why I think C is difficult.


C does not have the feature (yet), it is not about being difficult or not.


The fact that C doesn't have the feature makes it difficult if I want to perform that task!


Thing is, embedding binary files is not that useful, and there are easy enough ways to do it for those few that really needed it.

The C standard has been very cautious about adding features that would make the standard and the compilers more complex since it is the lingua franca of computing.

Nowadays there is really just a handful of archs in use and their compilers are all backends for GCC/LLVM, so they are relaxing a bit the gating of features.


Seems like a trivial feature to add though.

Like all the other features C has been missing for the last 30 years.




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

Search: