4 ms·
"CPY" seems to concentrate on syntax. I would not call an expressive syntax "redundant". From my perspective, redundancy in programming arises due to the lack o
by ktpsns 9y ago
"CPY" seems to concentrate on syntax. I would not call an expressive syntax "redundant". From my perspective, redundancy in programming arises due to the lack of programming skills or a good preprocessor, especially probably in the C/C++ world where codes are more likely tailored for speed.
The problem with (essentially) replacing the C/C++ syntax with a more lightweight (pythonic) one was already mentioned here in the threads: There will be a lot of corner cases which the CPY compiler does not understand.
- asfasgasg 9y agoRedundancy in C++ chiefly arises from textual inclusion as the mechanism for communicating about the capabilities of other modules. It's not because of a bad preprocessor or programming skill.
- ktpsns 9y agoCan you give an example of what you refer to? In my impression, most of the redundancy in the C world comes from the header/code seperation, i.e. all the signatures are repeated. Another level of redundancy was added by C++ templates where one quickly needs to write lengthy expressions, but the newer C++ standards resolved much of that thanks to the "auto a = b" type keyword or the "use X = Y" definitions. Note that "CPY" addresses none of these issues.
- ajross 9y agoGrandparent's use of "textual inclusion" was just a fancy way of saying "header/code separation". As I read it you guys agree.
- rileymat2 9y agoI must be one of the few that like the header/code separation. When dealing with plain text, I get a more concise view of what is going, as well as a view of what should be used by other modules.
- s_ngularity 9y agoThe problem with the separation is mainly with making changes to code, not with reading the code as it currently exists. This problem is avoided at no cost in Go, where an external tool can be used to get the same concise view of all of the function types that you like, without needing to manually create and update header files.
- nixpulvis 9y agoWriting code takes effectively no time, reading and reasoning is the primary concern (for me anyway).
- asfasgasg 9y agoMy first question would be: how much experience do you have with other languages? Because C and C++ are the only two major languages that have this separation, and everybody else seems to get on fine without it. If you're knowledgeable about other languages, then fair enough, preferences vary. If not, I ask you to consider the possibility that you only like it because it's familiar.
- rileymat2 9y agoI have been programming for 20 years. C++/Python/JavaScript/Visual Basic/Objective C/Java. Most of my work these days is in JavaScript (Node). I agree it is annoying to write, but I find well documented headers to be more usable than the other environments, if the project is large enough that I cannot read everything.
- cm2187 9y agoWhat do headers add that shouldn't be inferred from the code?
- jhasse 9y agoImprove compilation speed.