5 ms·
Because you can express these conditions and check compile time instead runtime.
by pezo1919 7y ago
Because you can express these conditions and check compile time instead runtime.
- pjmlp 7y agoSome contracts can be checked at compile time, if enough information is present. In fact one of the design decisions driving C++ contracts, which now will probably only show up in C++23 due to some last minute issues, is how the optimizer can take advantage of contracts while generating code. Languages like Idris are quite interesting for us on HN, but I seriously doubt that the kind of developers that languages like Eiffel are targeted to, would be able to take advantage of them with their current tooling state.
- vyjcgtyjb 7y agoContracts will not be in C++23 and certainly not in C++20.
- ncmncm 7y agoC++26, if then. There were no actual issues. At the last minute a bunch of people came up with a bunch of incompatible complexifications in support of <1% uses, and that added enough confusion to kill it. Much of the confusion came from people afraid that the optimizations might be bad. Now the same people who came up with the complications are driving the redesign, with no clear goals or unifying architecture, and no participation by the original designers. Don't expect to see contract support anytime soon.
- pezo1919 7y agoCan you tell me what kind of contracts can be checked compile time? (I assume you did not just mean types asserts.) What I've read about Eiffel on many sites is only runtime check (on more advanced constraints).