RE: [OT] difference of Scripting and programming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-05-23 at 15:04 -0700, Ian Puleston wrote:
> > -----Original Message-----
> > From: fedora-list-bounces@xxxxxxxxxx [mailto:fedora-list-
> > bounces@xxxxxxxxxx] On Behalf Of Jeff Vian
> >
> > > When you write a C program, isn't the source code a "script of commands"
> > > telling another program (the compiler), what to do?
> > 
> > yes
> 
> Nope, the compiler is simply a translator that translates the program into
> terms that the computer understands. It's the computer that executes the
> program, not the compiler.
> 
The same applies to an interpreter. It "interprets" the code (script)
and provides the resulting machine understandable commands to the
machine.

> > >
> > > I think the essence and intent of what you are saying is exactly what I
> > > was thinking, but is there a loophole there ?
> > >
> > 
> > Not really.  A compiled program also tells another program what to do.
> > For example a compiled binary interacts with the hardware by making
> > system calls that are handled by the kernel or the video driver or .....
> 
> You're not seeing the wood for the trees. Obviously at the end of the day
> everything is executed by the computer and a computer program makes use of
> all sorts of system utilities. But think in terms of a block diagram of the
> system components - the entity that executes a computer program is the
> computer itself. The entity that executes a script is some other program
> (bash, Perl, whatever).

No, that is a misrepresentation.  The interpreter serves a function
similar to the compiler.  It makes human readable text into machine
understandable code. (run time compiled instead of precompiled)  The
real difference is when the compiling is done, and how.  

Sure there are differences in capabilities, but that applies to all
different languages in each category as well as to between the
categories.

> > A program that makes direct hardware calls is severely frowned upon
> > these days.  Thus, except for the kernel and specialized hardware
> > drivers, all programs, whether they be binary executables (compiled) or
> > scripts (interpreted) actually interact in defined ways with other
> > programs (the shell, the kernel, the compiler, the interpreter, etc).
> 
> Which doesn't conflict at all with my definitions - the program is telling
> the computer itself what to do, including telling it to make calls to system
> functions etc.
> 

Exactly, but it is even more evidence that programming is programming,
regardless of the language used, and regardless of whether the code is
compiled/binary or script/interpreted.
  
> Ian
> 
> 
> 
> 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux