|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 | Next > |
|
|
Re using BREAK in 'C'> And I don't when I can help it. Of course that is orthogonal the argument
that C is a very badly designed language. Times were different when Algol and Pascal were invented too, so that's no excuse. /> Pascal about 1968-1970. C About 1970 -1972. C arguably related to BCP Pascal as a teaching language. C as a tool to assist development of the PDP11. C has many many sharp edges. It does many things "badly". C is famed for it's ability to obfuscate its code - & to do things a zillion different ways. Pascal wraps you in cotton wool. Type enforcement on C is essentially unknown. Lint and friends add protection and checking that the language could but doesn't. What a compiler might do now and what could be expected 'back then' (almost 40 years ago !!!) differ somewhat. C is rough and brutal and assumes that you know what you are doing and do what you are knowing. Pascal attempts to only allow you to do valid and non-dangerous things. (Assembler allows you do do almost anything - any argument that applies to a C defect usually applies to assembler as well where the two can be compared). Both languages are annoying in the wrong hands - C because it allows users to do fatal things easily, Pascal because it makes it harder for experts to do some things well easily - or sloppily easily. Pascal leans towards nanny state and C towards libertine excess. Both languages are "bad" given the appropriate assumption set. For sensible everyday use it's harder to find an assumption set that makes C good :-). But it has its place, preferably in suitably expert hands. Russell -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'Russell McMahon wrote:
> Both languages are annoying in the wrong hands - C because it allows > users to do fatal things easily, Pascal because it makes it harder > for experts to do some things well easily - or sloppily easily. > Pascal leans towards nanny state and C towards libertine excess. The original Pascal that was defined as a teaching language is indeed annoying, even if you try to write responsible code. This is why there are Pascal variants. Bare Pascal is essentially unusable as a real language. The basic concepts of Pascal however are sound, as various implementations have proven. The most well known two are probably Borland and Apollo. I happen to be familiar with the Apollo variant, but have heard good things about the Borland version too. My version of Pascal is based on the Apollo version. Once you talk about one of the useful implementations of Pascal, your argument no longer works. Show me something that you think the language should let you do as a expert but won't. > Both languages are "bad" given the appropriate assumption set. For > sensible everyday use it's harder to find an assumption set that > makes C good :-). But it has its place, preferably in suitably expert > hands. Again, where's the advantage? Experts understand the importance of code readability and maintainence. What exactly is it that such a expert want's to do that Pascal won't allow? ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'Maybe a little OT here, but... :-) :-)
Russell McMahon wrote: > C as a tool to assist development of the PDP11. Wasn't it to assist development *on* the PDP11 ? -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'Olin Lathrop wrote:
> Russell McMahon wrote: >> Both languages are "bad" given the appropriate assumption set. For >> sensible everyday use it's harder to find an assumption set that >> makes C good :-). But it has its place, preferably in suitably >> expert hands. > > Again, where's the advantage? Experts understand the importance of > code readability and maintainence. What exactly is it that such a > expert want's to do that Pascal won't allow? It seems you answered this question: the original Pascal is "essentially unusable" (your words). There are a number of usable dialects, but no usable standard Pascal. OTOH, there is a C standard. Even though the standardized C is arguably inferior to a number of Pascal dialects, the fact that there is a standard has probably been one of the drivers of the popularity of C (at least outside the *x world). FWIW, I think the time scale you cite is misleading. I think you'd have to start with the first compiler that was usable for the implementation of an operating system. We know when that was for C; when was it for Pascal? Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Compiler history (was "BREAK in C")On Jun 29, 2009, at 9:16 AM, Olin Lathrop wrote: > Bare Pascal is essentially unusable as a real language. So perhaps L&R weren't so stupid to ignore it after all? I think that certainly in those days one tended to dismiss or accept languages entirely rather than picking and choosing among the features/ constructs.) Almost certainly Pascal would have been rejected as a whole (assuming K&R were even aware of it) rather than anyone thinking "well, pascal has a nice CASE structure that we could adopt..." (MORE likely, IMO, is logic that went like "We're not willing to give up 'goto' and we are willing to live with the ugliness that implies without having lots of rules about how it should operate.") ========== But that's not what I want to talk about, really. The history of computer languages is usually presented as we've been doing here. Algol, C, Pascal as near contemporaries (and following Fortran, BASIC, and Cobol.) That's fine, but the piece that is missing is the "compile environment" itself. The original C grew from the B compiler running in 8k of memory on a PDP7. The original Pascal ran on a CDC 6000 mainframe, one of the largest/fastest systems available in that timeframe. It shouldn't be a big surprise that the language designers had drastically different viewpoints on language design, or that C was willing to trade off "dangerous" for "simple." There ought to be included in language histories some indications of what sort of computer was required to run the early implementations, and perhaps some additional history of when the language "made it" to other architectures (and with what limitations.) BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'Gerhard Fiedler wrote:
> It seems you answered this question: the original Pascal is > "essentially unusable" (your words). There are a number of usable > dialects, but no usable standard Pascal. OTOH, there is a C standard. That explains in part why C took off. I never disagreed that C is more popular. I'm only pointing out what a horrible language it is, and that the designers of that language should have known better because better constructs were already known at that time. > FWIW, I think the time scale you cite is misleading. I think you'd > have to start with the first compiler that was usable for the > implementation of an operating system. We know when that was for C; > when was it for Pascal? We're talking about concepts that K+R were almost certainly aware of when they were designing C. The concepts behind Algol and Pascal were well publisized at the time. Unless K+R were hiding in a cave while designing C and several years previously (and I really don't think so), they definitely knew better. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'Olin Lathrop wrote:
> Gerhard Fiedler wrote: >> It seems you answered this question: the original Pascal is >> "essentially unusable" (your words). There are a number of usable >> dialects, but no usable standard Pascal. OTOH, there is a C standard. > > That explains in part why C took off. I never disagreed that C is > more popular. I'm only pointing out what a horrible language it is, > and that the designers of that language should have known better > because better constructs were already known at that time. But you fail to understand that there are reasons for the popularity. Reasons that may not be valid today, but that were at the time it happened. You need to look at things from the perspective of the time, not of today. >> FWIW, I think the time scale you cite is misleading. I think you'd >> have to start with the first compiler that was usable for the >> implementation of an operating system. We know when that was for C; >> when was it for Pascal? > > We're talking about concepts that K+R were almost certainly aware of > when they were designing C. The concepts behind Algol and Pascal > were well publisized at the time. Unless K+R were hiding in a cave > while designing C and several years previously (and I really don't > think so), they definitely knew better. You didn't answer the question. The point is: was language design and compiler technology advanced enough at the time so that an efficient compiler could be made with reasonable effort that could have made it possible to create efficient OS code with the Pascal of the time? If so, why hadn't anybody written a suitable Pascal compiler in 1969 (when development of C started) that could've been used? K+R didn't set out to create a new language. They wanted to port an OS, needed something better than assembly for that ("better" in this context means mostly "more portable"), and had already B available. So they developed B into C, apparently making it more suitable for their task at hand -- not for you or me or anybody else. I don't think it became widely used outside the small scope of Unix until the 80ies, by which time the major features were already mostly settled -- not exactly as design from scratch, but as result of an ongoing development where the language was not a goal in itself, and the development of the language had to fit into all the normal resource constraints. You could just as well bitch at the Pascal developers for not making it a generally usable language in the first place (that is, incorporating the features that later, proprietary versions added to make it useable) and standardizing it. If they had done this, maybe K+R would have felt it was easier to adopt the new language rather than building on their code for B. But there was no new language suitable for their task. (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.) Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'On Tue, Jun 30, 2009 at 1:36 PM, Gerhard Fiedler <lists@...
> wrote: > The point is: was language design and > compiler technology advanced enough at the time so that an efficient > compiler could be made with reasonable effort that could have made it > possible to create efficient OS code with the Pascal of the time? If so, > why hadn't anybody written a suitable Pascal compiler in 1969 (when > development of C started) that could've been used? I think the answer is that because by that time an OS was written in Assembly and for everything else you used Algol pretty much (and Cobol). But I remember that early 80's I was already programming in Turbo Pascal 3 on the Z80 Softcard (the Z80 based CP/M expansion card by Microsoft on an Apple II). For a very long time Turbo Pascal on CP/M and later on on MS-DOS was very very popular. Also other Pascal implementations on Apple Mac was the main development stream, C was just an alternate language. It was not just a random thoughts from Borland that they pushed Delphi by that time instead of one of their many languages they had. Yes, they had the Turbo C/C++ compiler as well but that was only the second in the popularity list (and MS C was even less popular). Tamas -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'>Yes, they had the Turbo C/C++ compiler as well but that was
>only the second in the popularity list (and MS C was even >less popular). IIRC Borland were up to at least turbo Pascal 4 before they released turbo C 1. When you look at the libraries, it is quite obvious that they used common libraries, presumably recompiled for the different Pascal/C interfaces, but everything was there in both libraries. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'On Tue, Jun 30, 2009 at 2:49 PM, Alan B. Pearce <Alan.B.Pearce@...>wrote:
> IIRC Borland were up to at least turbo Pascal 4 before they released turbo > C > 1. When you look at the libraries, it is quite obvious that they used > common > libraries, presumably recompiled for the different Pascal/C interfaces, but > everything was there in both libraries. I never had a look at that library myself, but I would not be surprised as they did the same with Delphi / Borland C++ -- basically the Borland C++ package contained the Delphi compiler as well so that one could compile the source components for the RAD tool they had (you know, those drag and drop thingies like RS232 component they were using for Delphi only at the very beginning). Of course they still needed to implement some other stuff like printf and such basic C specific functions. Anyway, I have got your point. Tamas -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'Gerhard Fiedler wrote:
> K+R didn't set out to create a new language. They wanted to port an > OS, needed something better than assembly for that ("better" in this > context means mostly "more portable"), and had already B available. > So they developed B into C, apparently making it more suitable for > their task at hand -- not for you or me or anybody else. I don't > think it became widely used outside the small scope of Unix until the > 80ies, by which time the major features were already mostly settled > -- not exactly as design from scratch, but as result of an ongoing > development where the language was not a goal in itself, and the > development of the language had to fit into all the normal resource > constraints. 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. Today we have a very different world. 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. C is a horrible development language that encourages bad programming and bugs. I suspect even you largely agree with that. I think the real problem is that too many software developers fall into one of two catagories: 1 - I know C, like it well enough because I don't know anything better, don't want to learn something new, so I view a new language as a threat because I'd have to take time out to learn it. It took me weeks to understand those pointer thingies in C, and I don't want to go thru that again. 2 - I like C because I can do whatever I want without the compiler whining about it. Type checking is for sissies. Look at this really cool code I wrote that is a whole ray tracer on the back of a business card. Betcha you can't figure out how it works! Unfortunately there are sufficient numbers of type 1 (the dumb) and type 2 (the immature) programmers out there that bosses have to cater to them and development software suppliers have to cater to the bosses. 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. > You could just as well bitch at the Pascal developers for not making > it a generally usable language in the first place (that is, > incorporating the features that later, proprietary versions added to > make it useable) and standardizing it. If they had done this, maybe > K+R would have felt it was easier to adopt the new language rather > than building on their code for B. But there was no new language > suitable for their task. 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 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. At the least then promoting this hack (which is after all what you describe) was then irresponsible. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
|
|
|
Re: Re using BREAK in 'C'Gerhard Fiedler wrote:
> K+R didn't set out to create a new language. They wanted to port an OS, > needed something better than assembly for that ("better" in this context > means mostly "more portable"), and had already B available. So they > developed B into C, apparently making it more suitable for their task at > hand -- not for you or me or anybody else. I don't think it became > widely used outside the small scope of Unix until the 80ies, by which > time the major features were already mostly settled -- not exactly as > design from scratch, but as result of an ongoing development where the > language was not a goal in itself, and the development of the language > had to fit into all the normal resource constraints. > > (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.) Even more significantly, C was tremendously popular with the hobbyists working with the first microprocessor-based personal computers in the mid- to late-1970s, for all the same reasons that K&R used it. Also, a lot of college students were exposed to Unix and C (on the PDP-11) in that same time period. The popularity of C (among both groups) transferred immediately to the IBM PC when it appeared, and things just snowballed from there. Plus, there were many free versions of "tiny C" of varying levels of capability available for pretty much any CPU architecture. gcc, as a "full C" implementation, was also ported widely when it became available. IIRC, there were *no* free Pascal compilers for personal computers, except for those that became free towards their end-of-life. -- Dave Tweed -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'>IIRC, there were *no* free Pascal compilers for personal computers,
>except for those that became free towards their end-of-life. Byte did do a 'Byte Book of Pascal', which I seem to remember had the source code for a Pascal compiler, written in Pascal. The book was hard cover, about an inch thick, letter size pages IIRC. Still have a copy around somewhere, must dig it out and have a peruse of it. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'> Even if you take this as a excuse for why C was so poorly designed, it still
> doesn't excuse its widespread use today. Partly I agree, but I still type this on a qwerty keyboard. And I guess 99.99% of you do too. If you don't grok the relevance: qwerty layout was deliberately chosen to slow down typing speed. Yet we still use it. Who is to blame? -- Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'Wouter van Ooijen wrote:
> If you don't grok the relevance: qwerty layout was deliberately chosen > to slow down typing speed. AFAIK, it is an urban legend. Vitaliy -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'> > If you don't grok the relevance: qwerty layout was deliberately chosen > to slow down typing speed. Yet we still use it. Who is to blame? > Was it REALLY designed to slow down typing speed? I thought the key arrangement was designed to spread out commonly used keys so the type bars would not collide when one was returning to the type basket as another one was going up towards the platen. The end result may be slower typing, but was that the intent? Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'Vitaliy wrote:
> Wouter van Ooijen wrote: >> If you don't grok the relevance: qwerty layout was deliberately chosen >> to slow down typing speed. > > AFAIK, it is an urban legend. Reference? Did you ever try to repair a 'tangled' typewriter :) And even if it would be an urban legend: it is far from optimal. Yet we all use it. (Except for a friend of mine who insist on using a dworzjak or whatever it is called) -- Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: Re using BREAK in 'C'It 's Dvorak from 1936:
http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard The QWERTY is from 60 years before: http://en.wikipedia.org/wiki/QWERTY According to these the QWERTY was only designed to avoid jams instead of speed issues. It does not mean that with a Dvorak you cannot get a faster speed of typing. >From wikipedia again (http://en.wikipedia.org/wiki/Typing#Words_per_minute): An average typist <http://en.wikipedia.org/wiki/Typist> reaches 50 to 70wpm, while some positions can require 80 to 95 (usually the minimum required for dispatch positions and other typing jobs), and some advanced typists work at speeds above 120. As of 2005[update]<http://en.wikipedia.org/w/index.php?title=Typing&action=edit>, Barbara Blackburn<http://en.wikipedia.org/wiki/Typewriter#Typing_speed_records_and_speed_contests>is the fastest typist in the world, according to The Guinness Book of World Records<http://en.wikipedia.org/wiki/The_Guinness_Book_of_World_Records>. Using the Dvorak Simplified Keyboard<http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard>, she has maintained 150 wpm for 50 minutes, 170 wpm for shorter periods of time, and has been clocked at a peak speed of 212 wpm. Tamas On Tue, Jun 30, 2009 at 6:25 PM, Wouter van Ooijen <wouter@...> wrote: > Vitaliy wrote: > > Wouter van Ooijen wrote: > >> If you don't grok the relevance: qwerty layout was deliberately chosen > >> to slow down typing speed. > > > > AFAIK, it is an urban legend. > > Reference? > > Did you ever try to repair a 'tangled' typewriter :) > > And even if it would be an urban legend: it is far from optimal. Yet we > all use it. (Except for a friend of mine who insist on using a dworzjak > or whatever it is called) > > -- > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > docent Hogeschool van Utrecht: www.voti.nl/hvu > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.mcuhobby.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
|
| < Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |