4 ms·
One of my first languages was C++. I cut my teeth on Bjarne's book. These days, I'd much prefer seeing C fill such a perf-specific role. I can't stand C++, and
by just2n 13y ago
One of my first languages was C++. I cut my teeth on Bjarne's book.
These days, I'd much prefer seeing C fill such a perf-specific role. I can't stand C++, and I've read through some massive, and what most people would call "well written" code bases in C++. Every one is its own world of WTFs with abuse of templates and operator overloading and weird RAII and scoping strategies. I can never read code in C++ and really understand what's going on until I've made a cursory pass, identified everything that semantically changes the meaning of the code and internalized that. That's incredibly frustrating considering readability is paramount in really any project, but especially when the code base is tens of thousands of lines. And given that I've never seen a real world example where these features have actually provided any benefit other than terseness, I can't understand why anyone would ever use them.
Outside of the IOCCC, I haven't had trouble reading C except things that abuse the preprocessor, and that's frowned upon. So why not C?
- tsahyt 13y agoI never really understood why C gets such a bad rep for readability. It's a very compact language, just having a couple of keywords and a few very fundamental concepts. There's no "guessing" what a line does, no "obfuscation by design", etc.
- PommeDeTerre 13y agoI've mostly seen the anti-C-syntax attitude come from two communities. The first is made up of those who prefer Pascal and Pascal-derived languages. The second is the Ruby crowd. The Pascal community was most vocal in the 1980s and 1990s, but has since dwindled in size. Today, it's often the Ruby community that's most vocal, and they are often very loud, indeed. Curiously, we don't really see this attitude from the Python community nearly as much as one would expect. I'm not completely sure why this is, but it may be due to many Python developers having extensive knowledge of C and the various languages influenced syntactically by C (C++, Java, C#, Objective-C, and so forth). Due to their breadth of knowledge, different syntaxes just aren't an issue worth getting upset about.
- gurkendoktor 13y agoNobody in this thread has claimed that C was unreadable, and now these non-present people are already being divided into groups. And whereas the Ruby crowd is loud, Python programmers have extensive knowledge of other language. Can we please not form artificial factions?
- PommeDeTerre 13y agoWe aren't talking about people in this specific thread of discussion. You do realize that, right? We are talking about people we work with, people we have worked with in the past, people we meet at conferences, people we deal with at other online venues, people we read articles written by, and so forth. Some of those people are the ones who are responsible for (unjustifiably, in my opinion) giving the C-style syntax a bad reputation by expressing their dislike for it. And, yes, the Pascal, Ruby and Python communities, among many others, do exist. They do have very different traits and attitudes. You're free to pretend that they don't exist, but the reality is that they do.
- cardiffspaceman 13y ago(forgot you (the LISP/s-expr people.))
- PommeDeTerre 13y agoThey've always been a pretty small community, though. They're much less vocal today than in the 1980s, for example, so their impact is negligible. This differs from the Ruby community, which is much larger, and whose messages loudly reach a much more significant crowd.