| ▲ | ahartmetz 9 hours ago |
| On the one hand, almost everyone (including C++ fans) agrees that the language is too big. On the other hand, comtracts just formalize an existing and useful concept. |
|
| ▲ | nickorlow 8 hours ago | parent | next [-] |
| Profiles should (hopefully) rein this in by getting people to start subsetting language features in their codebases |
| |
| ▲ | pjmlp 7 hours ago | parent [-] | | Let's see, they are still a bit of a dream regarding what they wish for, and what current static analysers can achieve, especially the lifetime one. | | |
| ▲ | uecker 6 hours ago | parent [-] | | I was thinking for implementing borrow-checker like rules for C but after I have seen what SMT solver can do I think it is not necessary to constrain the language in this way. |
|
|
|
| ▲ | ape4 9 hours ago | parent | prev [-] |
| Exactly. Many years ago people used to use C `struct` for objects but then that was formalized as `class`. |
| |
| ▲ | tialaramex 8 hours ago | parent [-] | | C++ "class" is the exact same user-defined type as C++ "struct" but with different defaults for privacy. | | |
| ▲ | ahartmetz 3 hours ago | parent [-] | | But C++ "struct" has many more features than C "struct". Virtual functions aka compiler-generated invisible vtables, constructors (initialization functions) and destructors (automagically called deinitialization functions), the whole templates complex of features... |
|
|