upvote
Profiles should (hopefully) rein this in by getting people to start subsetting language features in their codebases
reply
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.
reply
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.
reply
IIRC Rust's borrow checker analysis is more or less a subset of what SMT solving is capable of. It's "just" a question of tradeoffs made with respect to performance, complexity, precision, etc.
reply
Exactly. Many years ago people used to use C `struct` for objects but then that was formalized as `class`.
reply
C++ "class" is the exact same user-defined type as C++ "struct" but with different defaults for privacy.
reply
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...
reply