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

I'd love to see textual preprocessors kinda banned. Or at least done upstream and outside of the language. You can't both be <the language> and also have a textual preprocessor defined internally. It doesn't work.

I really like what Zig and C++ are doing with `const`.

https://ikrima.dev/dev-notes/zig/zig-metaprogramming/

Have you looked at Spinal?

https://github.com/SpinalHDL/SpinalHDL

https://spinalhdl.github.io/SpinalDoc-RTD/master/index.html

edit, I see in your post history that your first submission was on Prosser's macro expansion. https://www.spinellis.gr/blog/20060626/cpp.algo.pdf :)




zig: yes, it's very interesting. there's other parts i'm not sold about, but that idea is very interesting.

spinalHDL: yes, also interesting. although honestly, i really prefer SV. it's a shame that the language has become so complex, but a synthesizable subset still ends up being the best thing for me to efficiently describe hardware. what they did with generate() and parameterization (borrowed from VHDL?) is very nice. it's far, far, better than C++ templates for an analogous purposes. i very rarely need to use `if, `define in SV nowadays.

cpp: oh yes, i'm a nerd about languages/macros/meta-programming/etc.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: