sergio masci wrote: >> Even if you take this as a excuse for why C was so poorly designed, >> it still doesn't excuse its widespread use today. C got popular >> because it tagged along with Unix and for other marketing reasons >> like that compilers were available cheaply or freely. > > Don't be so dismissive of that tiny little word "free". It tends to > be a VERY powerful incentive. Besides, there usually is a reason why something is free. As there is no such thing as a free lunch, /somebody/ paid for it -- and had a reason to pay for it. And if something similar isn't free, it's usually because of the lack of such "somebodies" that pay for something to be free. Again, there is usually a reason. Also, when I started programming, neither the C compilers nor the Pascal compilers I used were free. IIRC, Turbo Pascal was among the least expensive ones, and that's what most people I knew used. They stopped using it, mainly because it was a one-vendor thing which didn't give it much of a future. >> Even if we accept all the above and understand C is required for some >> new projects only because it is already popular, what is missing is >> the outcry of users demanding something better. > > I've seem users "demanding" something better. I've even seen users > demanding to use better C compilers than the one currently being > used. My experience: it's like farting in a hurricane! I agree :) Especially if there isn't a common idea of something better. Demanding may be efficient for kings; "normal" people need really to do something else to get somewhere. >> All I'm looking for is some outcry from the minority rest of us to >> keep pointing out the faults in C and complain about wanting >> something better. It's not easy to change such intrenched thinking, >> but if we keep beating on it more and more people may slowly realize >> that C is a really bad idea. > > Ok so rather than simply write another C compiler I took the plunge > and tried to do something better. How far did this actually get me > with you an affirmed C detractor. Not very far, unluckily. Your XCSB seems to be something like another Turbo Pascal. >> Perhaps, but they still could have taken some of the concepts. Most >> of these things don't make the compiler much harder to write or the >> resulting code any less efficient. It's a mindset thing, and I >> think that's what K+R lacked. > > I agree that the resulting code would not have been less efficient > but I disagree that "the compiler would not have been much harder to > write". The early C compilers didn't even deal with function > prototypes. As Bill wrote, these early C compiler ran in 8k of memory of an early PDP (while Pascal was developed on the most powerful mainframe of the time). I think one really needs to consider the whole context when talking about the decisions made during development. (Asking the authors would probably also help.) >>> I think I have to repeat it: If someone wants to understand why C is >>> how it is, IMO it's tremendously helpful to think of it more as a >>> "portable assembly" than a "high-level language". That's how it set >>> out, that's the mind frame that determined most of its basic >>> structure. And IMO it's perfectly compatible with what it is. >> >> Right, but that mindset was itself irresponsible. Not anymore than people programming in assembly. Where it's adequate, it's adequate. Responsibly used it's not irresponsible. >> At the least then promoting this hack (which is after all what you >> describe) was then irresponsible. It wasn't "promoted". There is no "C conspiracy". C became popular because of certain characteristics that somehow matched certain needs, better than alternatives available at the time the needs arose. If you could let go of the "C irresponsible programmers conspiracy" theory and actually look at the history, I'm sure you'd be able to identify a few things that make sense (or made sense at the time they happened). Later on, it's not much different than people having huge assembly libraries and having a hard time switching to anything else because everything else in the beginning is a hurdle and a (even if temporary) loss of productivity. Or people having all their mechanical designs in outdated and dying units and having a hard time changing this, even though the direction is clear, so is the inevitability of the change, and it costs more each year to stick with the dying crowd. > Maybe it was but everyone's moral compass seems to be afected to some > degree by money and fame. I don't think that the reason why C became popular has much to do with morals or fame. K+R wrote a tool that did what they needed, other people started to use it because it also did what they needed (and apparently better than the alternatives), then there were many enough people using it that they standardized it, then the standard made it possible to (relatively) safely invest more in it, and the rest we know. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist