News for hackers. Stuff that matters.
Re:Why Safety Profiles Failed by whimsicalism on Thursday October 24, 2024 @09:44PM (#41941567)
Rust has nothing on template meta programming and the type signatures you get there, though
Re:Why Safety Profiles Failed by nickitolas on Thursday October 24, 2024 @10:53PM (#41941833)
Not to mention the error messages when you get something slightly wrong
Re:Why Safety Profiles Failed by jimbob45 on Thursday October 24, 2024 @11:48PM (#41942052)
I’ve spent a fair amount of time writing C++ but F12’ing any of the std data structures makes me feel like I’ve never seen C++ before in my life.
Re:Why Safety Profiles Failed by NekkoDroid on Friday October 25, 2024 @05:31AM (#41943628)
to be fair, a major cause of the pain of looking at the std is because of the naming and being semi-required to use reserved names for implementation details (either double underscore or starting underscore uppercase) and also for keeping backwards compat for older standard versions.
Re:Why Safety Profiles Failed by crest on Thursday October 24, 2024 @10:57PM (#41941856)
Give the proc macro fans a little more time...
Re:Why Safety Profiles Failed by jerf on Friday October 25, 2024 @09:49AM (#41945265)
I understand the point you are making, but C++ templates really are a uniquely disastrous programming model. They can be used to pull off neat tricks, but the way those neat tricks are done is terrible.
Re:Why Safety Profiles Failed by duped on Friday October 25, 2024 @10:49AM (#41945801)
When a proc macro fails you get an error at the site where the macro is used, and a stack trace into the proc macro crate. You can even use tools to expand the proc macro to see what went wrong (although those aren't built in, yet).

Debugging a proc macro failure is miles and above easier than debugging template errors.

Re:Why Safety Profiles Failed by consteval on Friday October 25, 2024 @11:06AM (#41945972)
This isn't really true since concepts were introduced. Granted, you have to use them, but it makes the debugging/error messages MUCH better.