Talk:C (programming language): Difference between revisions
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
Example date (works for C and Java): May 29<br>Month=4, day=29 |
Example date (works for C and Java): May 29<br>Month=4, day=29 |
||
Why is the month shifted but not the day of the month? Besides, if it is "the month is not a number", you deserve a slap in the face from your Korean (or Japanese or Chinese) secretary; ask her about it! |
Why is the month shifted but not the day of the month? Besides, if it is "the month is not a number", you deserve a slap in the face from your Korean (or Japanese or Chinese) secretary; ask her about it! In all these languages, May is literally "five month". (I think.) |
||
---- |
---- |
Revision as of 23:37, 6 December 2001
Do you think it's good to use /Evolution for writing down the changes, or /K and R C will suffice? Thanks, Uriyan
Actually I don't think either topic deserves a sub-page. I think a section on the main page would do. --drj
- === Eccentricity ===
- In C, the months of the year are numbered wrong. They are all low by 1. For example: January is month 0. December is month 11. This is not an obvious problem to English-speakers, but if your native language uses numbers to name the months of the year...
Numbering from 0 is not eccentricity. It's how computers think. --Taw
- That also has nothing at all to do with the C language, but with the standard libraries--that distinction should be made. --LDC
I don't even think thats an eccentricity since its fairly common in programming to do it that way --Alan D
- Fairly common today, but it wasn't in the Good Old Days. That makes it a fad, albeit a fairly long running one. Hint: make a list of languages since Day 1 and see when numbering from 0 began. GregLindahl
Java uses the same numbering scheme. Possibly because there is a zero-based array of month names. Although numbering from zero in both C and Java is more of a convenience for the routines that perform array handling than anything else. If your array starts at location AC00, the address of the 0th element is AC00, the address of element 1 is AC00 + element_length, the address of the 2nd element is AC00 + 2 * element_length, and so on. I prefer to start at element 1, but we're all pretty much stuck with the convention. (Perhaps I'll step up and start writing about software engineering, something I actually have some expertise in.) Ed Poor
Example date (works for C and Java): May 29
Month=4, day=29
Why is the month shifted but not the day of the month? Besides, if it is "the month is not a number", you deserve a slap in the face from your Korean (or Japanese or Chinese) secretary; ask her about it! In all these languages, May is literally "five month". (I think.)
The claim that C is the dominant microcomputer applications language is now somewhat dubious, IMHO. In the Windows world, it's probably a toss-up between Microsoft's C++ and Visual Basic, I'd guess. C still rules for embedded systems (that is, the ones not written in Assembler), in the Unix world (particularly for apps that don't have a GUI), and people who can't be bothered remembering C++'s arcane semantics for multiple inheritance and operator overloading :) --Robert Merkel
Recent stats of what percent of code in RedHat distro is written in which programing language, clearly shows that C is dominant, at least on Unices. It's very probable that C++ is much more popular on Windoze world, but I seriously doubt that many apps are written in VB. --Taw
Are we talking commercial apps or what? VB is insanely popular inside IT departments, but for commercial software its always been limited by that damn runtime DLL. C++ seems to rule commercial apps. As for C, its probly less common on windows than C++ at this point.