2 ms·
It could, but the comparison to Arduino still makes more sense since that's very well known and is pretty much C. It makes very little use of C++ features. Espe
by IshKebab 4y ago
It could, but the comparison to Arduino still makes more sense since that's very well known and is pretty much C. It makes very little use of C++ features. Especially advanced stuff like this - probably partly to avoid difficult error messages for beginners and partly because the Arduino developers (the original ones at least) were shit at API design.
- pjmlp 4y agoYeah, but then the example is anyway flawed, type level programming is also a thing in C++.
- sophacles 4y agoSorry would that be any C++, modern C++ (as described 10 years ago), modern C++ (as described 5 years ago), modern C++ (as described today), a special C++ subset known to MCU folks or something else?
- pjmlp 4y agoSarcasm ignored. Type level programming is possible in C++98. Easy to reach for in most embedded compilers, when people actually use C++ compilers for C++, and not the C subset.
- sophacles 4y agoI see you've made this claim in many places in the thread. Care to provide an example, maybe back your words? I can declare factoring large numbers is "trivial" too, but until I show my work, everyone will rightly declare me a kook.
- pjmlp 4y agoI also provided an example from CppCon, yours to find out which comment, with that attitude. Apparently you missed that one.
- tialaramex 4y agoC++ inherits from C the flaw that it is as Dennis Ritchie put it "Strongly typed but weakly checked". In this case that hurts really badly because it means your C++ compiler is likely to let you do stuff that's nonsense, because checking isn't part of the job description, if you claim this Duck is a Goose the C++ compiler just rolls its eyes, sure whatever, however rustc says that is a Duck, you said it's a Goose but it is not, that's an error. That checking means a hard left shift for such bug finding, which can mean a substantial direct financial saving on QA or an improvement in feature velocity.
- pjmlp 4y agoYeah, copy-paste compatibility is a blessing for adoption, and a curse for herding cats into better coding practices. Same can be told about TypeScript, Groovy or any other language that follows the same adoption model.