Subj : Re: Do all programming languages use files? To : comp.programming From : mwojcik Date : Fri Sep 02 2005 03:44 pm In article <5iceh1t06uef3090sjdslm42oplrbs4lha@4ax.com>, Chris Sonnack writes: > Michael Wojcik writes: > > >[restoring snipped attribution: the following was written by Scott > >Moore] > >> Semantics. If its a library, then you could well argue that GPS > >> is built into the language, since there are undoubtedly libraries > >> for that. > > > > The Standard defines the language; the Standard includes the standard > > library (and no others); the standard library includes file I/O; thus > > the language includes file I/O (for hosted implementations). Your > > argument is utterly without merit. > > 0. Community begins with *trying* to see the other guy's point. I've seen it. It's wrong. It's equally important, in a community, to evaluate the other guy's point. > 1. I have no real interest or opinion on languages having native I/O... > 2. ...But I do disagree his argument is *utterly* without merit. > > I do see a difference between the syntactical definition of a language > and its, for lack of a better word, "semantic" definition. That's a valid argument. "All libraries are equal in their degree of inclusion in the C language" is not, and that's the argument I was referring to. > And if you good look at the reserved keywords for C, you won't find > fprintf, printf, fputs or any other I/O family members. Nor will > you find stdout or stdin. I'm well aware of that, since I have a copy of the standard right by my desk. "fprintf" is not a keyword. It is, however, a reserved identifier, if stdio.h is included, so I don't find the "not a keyword" argument compelling. "main" is not a keyword, either; does that make it not part of the C language? "include" is not a keyword (C90 6.1.1); does that mean "#include" is not part of C? > And I would think that the need to say "hosted" implementation when > discussing this makes it pretty clear that there is such a thing as > *valid*, *legal* C with no I/O. I made that point in my first post to this thread. It's irrelevant to this argument: "Exists some C without X" does not imply "All C has no X". Basic propositional logic there. > Maybe the original question just needs to be re-framed to include > "native, non-library-based" I/O or similar. I don't believe those terms are well-defined across programming languages, either in their official specifications or in their various implementations. (It's quite possible that there's no generally-acceptable definition of what constitutes the "native portion" of an AS/400 implementation of a language, for example.) -- Michael Wojcik michael.wojcik@microfocus.com Some seem to live on credit as naturally as they breathe, and I remember the surprise of one of these: "What! You don't owe anybody anything! Good Lord! man, lend me half a sovereign." -- Arthur Ransome .