Click here to Skip to main content
15,914,066 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: C is a better language than any language you care to name. Pin
Nemanja Trifunovic29-May-14 9:59
Nemanja Trifunovic29-May-14 9:59 
GeneralRe: C is a better language than any language you care to name. Pin
Joe Woodbury29-May-14 10:07
professionalJoe Woodbury29-May-14 10:07 
GeneralRe: C is a better language than any language you care to name. Pin
Joe Woodbury29-May-14 10:47
professionalJoe Woodbury29-May-14 10:47 
GeneralRe: C is a better language than any language you care to name. Pin
Jeremy Falcon29-May-14 11:01
professionalJeremy Falcon29-May-14 11:01 
GeneralRe: C is a better language than any language you care to name. Pin
Nemanja Trifunovic29-May-14 12:35
Nemanja Trifunovic29-May-14 12:35 
GeneralRe: C is a better language than any language you care to name. Pin
Joe Woodbury29-May-14 12:56
professionalJoe Woodbury29-May-14 12:56 
GeneralRe: C is a better language than any language you care to name. Pin
jschell30-May-14 13:31
jschell30-May-14 13:31 
GeneralRe: C is a better language than any language you care to name. Pin
Joe Woodbury30-May-14 13:53
professionalJoe Woodbury30-May-14 13:53 
You are arguing against something I never said. Specifically, nowhere did I say that the precompiler isn't part of the language.

More generally, my point is that the information about the size of the array is known only by the scope of the array declaration at compile time; it is not contained in the array itself and available at runtime. In C, an array and a pointer are, for all intents and purposes, synonymous (with the exception of this very narrow edge case.) So, the [partial] function declarations a(const char* p) and b(const char d[]) mean the same thing. Doing a sizeof(d) for the latter doesn't tell you anything meaningful about the original array.

This also means that you can take an arbitrary pointer and use array syntax on it. i.e. p[3]. This gives C an enormous power and flexibility found in few other languages. Attaching any other information to a pointer (or array) changes the very nature of what a pointer is and adds overhead that is often not desired nor wanted (and if desired, you can easily create a struct (or class in C++) with that information contained in it. This very flexibility means that arguing that arrays are problematic in C is a strawman argument.)
GeneralRe: C is a better language than any language you care to name. Pin
jschell2-Jun-14 9:03
jschell2-Jun-14 9:03 
GeneralRe: C is a better language than any language you care to name. Pin
PIEBALDconsult30-May-14 19:39
mvePIEBALDconsult30-May-14 19:39 
GeneralRe: C is a better language than any language you care to name. Pin
jschell2-Jun-14 9:13
jschell2-Jun-14 9:13 
GeneralRe: C is a better language than any language you care to name. Pin
PIEBALDconsult30-May-14 16:42
mvePIEBALDconsult30-May-14 16:42 
GeneralRe: C is a better language than any language you care to name. Pin
dandy7229-May-14 10:14
dandy7229-May-14 10:14 
GeneralRe: C is a better language than any language you care to name. Pin
Ernst Iliov Stavro Blofeld29-May-14 10:46
Ernst Iliov Stavro Blofeld29-May-14 10:46 
GeneralRe: C is a better language than any language you care to name. Pin
  Forogar  29-May-14 12:15
professional  Forogar  29-May-14 12:15 
GeneralRe: C is a better language than any language you care to name. Pin
Member 419459329-May-14 13:27
Member 419459329-May-14 13:27 
JokeRe: C is a better language than any language you care to name. Pin
Karen Mitchelle29-May-14 15:46
professionalKaren Mitchelle29-May-14 15:46 
RantRe: C is a better language than any language you care to name. Pin
Vivi Chellappa29-May-14 19:18
professionalVivi Chellappa29-May-14 19:18 
GeneralRe: C is a better language than any language you care to name. Pin
PIEBALDconsult29-May-14 19:23
mvePIEBALDconsult29-May-14 19:23 
JokeRe: C is a better language than any language you care to name. Pin
Rutvik Dave29-May-14 19:59
professionalRutvik Dave29-May-14 19:59 
GeneralRe: C is a better language than any language you care to name. Pin
Roger Wright29-May-14 20:36
professionalRoger Wright29-May-14 20:36 
GeneralRe: C is a better language than any language you care to name. Pin
Rutvik Dave30-May-14 0:08
professionalRutvik Dave30-May-14 0:08 
JokeRe: C is a better language than any language you care to name. Pin
Peter Adam29-May-14 21:07
professionalPeter Adam29-May-14 21:07 
GeneralRe: C is a better language than any language you care to name. Pin
Michael Kingsford Gray29-May-14 21:43
Michael Kingsford Gray29-May-14 21:43 
GeneralRe: C is a better language than any language you care to name. Pin
PIEBALDconsult30-May-14 16:45
mvePIEBALDconsult30-May-14 16:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.