Skip to main content
added 230 characters in body
Source Link
Davislor
  • 9.2k
  • 19
  • 39

It’s defined in a header file, so that every execution unit that includes it will duplicate the code. But why would anyone ever want to compile multiple copies of this code into their executable? It’s completely identical, is not supposedand there’s no reason to ever runoptimize the path where an assertion fails, because that should never happen in production code. (And even when it does, and can run at leastit only runs once in development.)

The behavior is completely different between C and C++.

There is already an assert() in the standard library that is absolutely portable, does the same thing in both languages, and is easier to use.

It’s defined in a header file, so that every execution unit that includes it will duplicate the code. But why would anyone ever want to compile multiple copies of this code into their executable? It’s completely identical, is not supposed to ever run in production, and can run at least once in development.

The behavior is completely different between C and C++.

It’s defined in a header file, so that every execution unit that includes it will duplicate the code. But why would anyone ever want to compile multiple copies of this code into their executable? It’s completely identical, and there’s no reason to optimize the path where an assertion fails, because that should never happen in production code. (And even when it does, it only runs once.)

The behavior is completely different between C and C++.

There is already an assert() in the standard library that is absolutely portable, does the same thing in both languages, and is easier to use.

deleted 8 characters in body
Source Link
Davislor
  • 9.2k
  • 19
  • 39

This would be a lot more useful if you picked some practical use cases and focused on making those simpler to write. I’d suggest you drop everything that’s already standardized and every bit of historical esoterica that you cannot actually test. I don’t own a thirty-year-old Cray supercomputer either, but I sincerely doubt that this librarybet you there would actually run correctlybe some kind of compatibility problem if I ever tried to use it on one.

This would be a lot more useful if you picked some practical use cases and focused on making those simpler to write. I’d suggest you drop everything that’s already standardized and every bit of historical esoterica that you cannot actually test. I don’t own a thirty-year-old Cray supercomputer either, but I sincerely doubt that this library would actually run correctly if I tried to use it on one.

This would be a lot more useful if you picked some practical use cases and focused on making those simpler to write. I’d suggest you drop everything that’s already standardized and every bit of historical esoterica that you cannot actually test. I don’t own a thirty-year-old Cray supercomputer either, but I bet you there would be some kind of compatibility problem if I ever tried to use it on one.

added 412 characters in body
Source Link
Davislor
  • 9.2k
  • 19
  • 39

In Conclusion

This would be a lot more useful if you picked some practical use cases and focused on making those simpler to write. I’d suggest you drop everything that’s already standardized and every bit of historical esoterica that you cannot actually test. I don’t own a thirty-year-old Cray supercomputer either, but I sincerely doubt that this library would actually run correctly if I tried to use it on one.

I also highly recommend taking out every attempt to define a new common interface between C and C++ that actually behaves differently on both anyway—especially when the C version runs just fine on a C++ compiler.

In Conclusion

This would be a lot more useful if you picked some practical use cases and focused on making those simpler to write. I’d suggest you drop everything that’s already standardized and every bit of historical esoterica that you cannot actually test. I don’t own a thirty-year-old Cray supercomputer either, but I sincerely doubt that this library would actually run correctly if I tried to use it on one.

I also highly recommend taking out every attempt to define a new common interface between C and C++ that actually behaves differently on both anyway—especially when the C version runs just fine on a C++ compiler.

Source Link
Davislor
  • 9.2k
  • 19
  • 39
Loading