Difference between revisions of "Talk:C"
Shedletsky (talk | contribs) |
|||
Line 31: | Line 31: | ||
I think that John's point was that something like "C is fast" would imply not that C itself is fast (though it really is - a language like Java will be slower if we're comparing the ideal same C program to the ideal Java program), it would imply that usually a game written in C will be faster. C allows the programmer to write a program that runs faster than one written in another language. Java allows the programmer to use OO to better organize the code. These sorts of statements shouldn't be excluded on the basis that someone may say "hmmph, well I program in C and my code is well organized!", because they do describe what is typically true of a language and what makes it distinct in practice. Then again, saying "C is fast" without explaining what is meant probably isn't desirable either. [[User:M|<b><i>[[User:M|–M]]<sup>[[User_talk:M|T]]</sup></i></b>]] 00:50, 10 Oct 2005 (CEST) | I think that John's point was that something like "C is fast" would imply not that C itself is fast (though it really is - a language like Java will be slower if we're comparing the ideal same C program to the ideal Java program), it would imply that usually a game written in C will be faster. C allows the programmer to write a program that runs faster than one written in another language. Java allows the programmer to use OO to better organize the code. These sorts of statements shouldn't be excluded on the basis that someone may say "hmmph, well I program in C and my code is well organized!", because they do describe what is typically true of a language and what makes it distinct in practice. Then again, saying "C is fast" without explaining what is meant probably isn't desirable either. [[User:M|<b><i>[[User:M|–M]]<sup>[[User_talk:M|T]]</sup></i></b>]] 00:50, 10 Oct 2005 (CEST) | ||
"you can't write that C is an inferiour choice for roguelike development". I don't think I wrote that. Geez. Get off my case. I don't have any patience for language demogoguery. Given two languages, A and B, that are otherwise identical, if A has garbage collection and B doesn't, then most people will agree A is better. This doesn't reflect on C as a language itself, but lack of garbage collection is definitely a minus and that was my original point. | |||
Furthermore, C is fast. You are complicating the issue. Like M says, when you get down to it, C is just faster than anything except possibly assembly. | |||
As far as wikipedia goes, I only mentioned it because it's a good source for people who want more details about the C language itself, as opposed to info that might help them decide whether to write a RL in C. For instance, wikipedia will supply you with the details supporting the claim "C is fast". | |||
[[User:Shedletsky|<b><i>[[User:Shedletsky|–John Shedletsky]]<sup>[[User_talk:Shedletsky|Talk]]</sup></i></b> ]] 04:05, 10 Oct 2005 (CEST) |
Revision as of 02:05, 10 October 2005
That such statements like "C is fast" or "C is highly portable" are misleading should be obvious to most programmers. I can write highly unportable and very slow C code - don't dare me! ;)
And then there was this statement:
- Lack of classes makes it hard to do an object-oriented design, limiting project flexibility (so you have to plan ahead)
The author claims that OOD automatically makes a project "flexible" and that non-OOD based projects have to "plan ahead". I see no proof for this statement. I use C and I never had to rewrite, unlike many developers who use OOP languages and I didn't "plan ahead" for sure. The often claimed superiority of OOP is unproven, especially as far as roguelikes are concerned because not one of the major RLs is based on real OOP. I don't want to say that procedural programming is superior, in fact maybe OOP is indeed superiour but please don't write such stuff here until its proven.
In general I ask everyone to avoid "language wars" in these articles. If editors claim that "lack of OOP support" is a "Con" some functional programming zealots might start adding "lack of real FP" to all languages. Know what I mean? --Copx 17:26, 8 Oct 2005 (CEST)
I wrote the original article. Most of your edits are fine, but I think some of them are obfustication. "C is fast" is a good take-away point. You replaced that with several sentences that amount to the same thing. In general I agree that more information is better than less - but it's good to boil things down to talking points the Pro/Con bullet list, is it not?
Your changes also de-emphasize some rather critical points I made about C, namely the lack of native GC. This is an important point for practical RL dev, IMHO.
OOP vs. procedural programming is a side issue and perhaps is best addressed in a separate article.
I think some of my points regarding C's lack of modern language features are valid and of practical concern for RL devs and should be re-instated.
I approached this article as writing a practical guide for RL devs. Anyone interesting in C as a language in and of itself will always be better served by wikipedia, where a lot of the concerns you raise are answered.
[[User:Shedletsky|–John ShedletskyTalk ]] 00:26, 9 Oct 2005 (CEST)
Sorry, but statements like "C is fast" or "C is portable" are simply incorrect. C can't copy bytes from one memory area to another faster than other languages for example. It's just that typical C code does different things than similar code in higher level languages. For example another language might do bounds checking by the default in such cases so the operation is slower but that doesn't mean that "C is faster". I could write/use a C routine that does bounds checking, and such a routine would have the same performance characteristicts as the functinon used by the higher level language.
As far as the other stuff is concerned: You wrote "IMHO" and that's the point. It's just your opinion, not a fact. You mentioned wikipedia so you probably know what NPOV (Neutral Point of View) means, you can write that C has no garabage collection by default and mention the issues of manual memory management but you can't write that C is an inferiour choice for roguelike development. Community-based wikis are no place for "A is better than B" statements 'cause I ensure you that people won't agree.
If you want to write some "Why OOP is a superiour choice for RL development" article do it on your own homepage and post a link. Or do it here and clearly mark at as your personal opinion, not as some unquestionable fact. --Copx 10:20, 9 Oct 2005 (CEST)
I think that John's point was that something like "C is fast" would imply not that C itself is fast (though it really is - a language like Java will be slower if we're comparing the ideal same C program to the ideal Java program), it would imply that usually a game written in C will be faster. C allows the programmer to write a program that runs faster than one written in another language. Java allows the programmer to use OO to better organize the code. These sorts of statements shouldn't be excluded on the basis that someone may say "hmmph, well I program in C and my code is well organized!", because they do describe what is typically true of a language and what makes it distinct in practice. Then again, saying "C is fast" without explaining what is meant probably isn't desirable either. [[User:M|–MT]] 00:50, 10 Oct 2005 (CEST)
"you can't write that C is an inferiour choice for roguelike development". I don't think I wrote that. Geez. Get off my case. I don't have any patience for language demogoguery. Given two languages, A and B, that are otherwise identical, if A has garbage collection and B doesn't, then most people will agree A is better. This doesn't reflect on C as a language itself, but lack of garbage collection is definitely a minus and that was my original point.
Furthermore, C is fast. You are complicating the issue. Like M says, when you get down to it, C is just faster than anything except possibly assembly.
As far as wikipedia goes, I only mentioned it because it's a good source for people who want more details about the C language itself, as opposed to info that might help them decide whether to write a RL in C. For instance, wikipedia will supply you with the details supporting the claim "C is fast".
[[User:Shedletsky|–John ShedletskyTalk ]] 04:05, 10 Oct 2005 (CEST)