Re: Do all programming languages use files?



Scott Moore wrote:

> From K&R "The C programming language" the introduction:
>
> "C itself provides no input/output facillities; there are no READ or WRITE
> statements, no built-in file access methods".
>
> These guys WROTE the language. Have we pounded this into the ground yet ?
>

I'm not trying to beat you up here. I am trying to make you realize that language
designers don't consider libraries to be part of the language itself. The library
is a support system, like a linker or loader. The language itself has several
properties that are distinct from libraries:

1. The language is parsed.

2. The language is expressed in the BNF.

3. A language feature that is part of the language is handled in the
compiler itself, vs. the linker. Fortunately, or unfortunately if you prefer,
there are system functions in some languages that can appear in the compiler
itself, be parsed and have a BNF, and still look like external functions.

Its also not anything against a language if it does not include I/O. The makers
of C were very justifiably proud of the fact that I/O was NOT part of the
language. Why ? Because it is a mark of the flexibility of the language if
it can rely on external libraries to provide this important function instead
of building it into the compiler.

.



Relevant Pages

  • Re: C Programmer Needed
    ... >>>The second approach is to extend the language to allow the programmer ... it would be a cleaner solution to extend the language. ... >>>the compiler this is to mark the array as volatile. ... > whole program compilation, including the libraries. ...
    (comp.programming)
  • Re: Languages with well-integrated Foreign Function Interface to learn from?
    ... for scripting language FFIs. ... it seems that this interface wouldn't ... and that the standard libraries could not be ... same types of metadata which is often available only to the compiler (AKA: ...
    (comp.compilers)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... > no time there was a fully compiant C compiler available. ... Let's address the Ada side first. ... compiler for C, Ada, or any other language. ... Ada certainly provides facilities useful for writing libraries, ...
    (comp.lang.ada)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... > no time there was a fully compiant C compiler available. ... Let's address the Ada side first. ... compiler for C, Ada, or any other language. ... Ada certainly provides facilities useful for writing libraries, ...
    (comp.lang.cpp)
  • Re: OT: Requesting C advice
    ... language designers made the language ... Since when is C a virtual machine language? ... Every compiler I've used compiles C to native machine code for the ... libraries was not pleasant. ...
    (Fedora)