Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #6275

Re: First Program with Python!

From Richard Heathfield <rjh@cpax.org.uk>
Newsgroups comp.programming
Subject Re: First Program with Python!
Date 2016-02-15 20:16 +0000
Organization A noiseless patient Spider
Message-ID <n9tbhv$hp5$1@dont-email.me> (permalink)
References <56ee81f0-8542-49e5-a177-c7794f2d48d7@googlegroups.com> <20160215083844.251@kylheku.com> <n9t1s6$825$1@dont-email.me>

Show all headers | View raw


On 15/02/16 17:31, BartC wrote:
> On 15/02/2016 16:46, Kaz Kylheku wrote:
>> On 2016-02-09, anitagoyal571@gmail.com <anitagoyal571@gmail.com> wrote:
>>> Interpreter is a program that converts the high-level program we write
>>> into low-level program that the computer understands.
>>
>> Complete nonsense. That is a compiler.
>>
>> An interpreter is a program which reads another another program,
>> translating it into execution pathways through existing blocks of code
>> which make the interpreter.
>>
>> The interpreter looks at the code and using its existing hard-coded
>> logic (not any newly generated code) performs whatever meaning that code
>> indicates.
>
> That sounds sensible but it could also apply to a microprogrammed
> processor executing machine code.

Yes, that's exactly what a CPU is - a machine code interpreter.

> And you could take what is thought of as conventionally compiled code
> and run it via an interpreter (or emulator) for that code on any hardware.

Yes.

> If there is any translation involved at all from source code to some
> other, usually less human-readable format, then both compilers and
> interpreters can do that.

Interpreting is on-the-fly conversion - decode it *right now* and then 
do it *right now*. Compilation is conversion into another language for 
later use.

> Usually a compiler generates native code directly, an interpreter some
> made-up code that has to be executed with a special program. But there
> is plenty of overlap.

There's plenty of overlap between, say, cars and bikes (e.g. motorbikes 
are essentially cars with two wheels, and motorised bicycles are bikes 
with engines, and no, the two are not the same thing), but that doesn't 
mean the distinction between cars and bikes is not useful.

Similarly, there is a certain amount of overlap between compilers and 
interpreters. Nevertheless, one will understand those terms best if one 
looks at the differences, not the similarities, between them.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

First Program with Python! anitagoyal571@gmail.com - 2016-02-09 06:11 -0800
  Re: First Program with Python! Richard Heathfield <rjh@cpax.org.uk> - 2016-02-09 14:30 +0000
    Re: First Program with Python! Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-02-09 14:35 +0000
      Re: First Program with Python! Richard Heathfield <rjh@cpax.org.uk> - 2016-02-09 19:06 +0000
        Re: First Program with Python! Öö Tiib <ootiib@hot.ee> - 2016-02-09 16:55 -0800
          Re: First Program with Python! Richard Heathfield <rjh@cpax.org.uk> - 2016-02-10 09:20 +0000
          Re: First Program with Python! Kaz Kylheku <330-706-9395@kylheku.com> - 2016-02-15 16:49 +0000
    Re: First Program with Python! Öö Tiib <ootiib@hot.ee> - 2016-02-09 16:32 -0800
      Re: First Program with Python! BartC <bc@freeuk.com> - 2016-02-10 14:07 +0000
        Re: First Program with Python! David Brown <david.brown@hesbynett.no> - 2016-02-10 16:24 +0100
          Re: First Program with Python! BartC <bc@freeuk.com> - 2016-02-10 16:55 +0000
            Re: First Program with Python! David Brown <david.brown@hesbynett.no> - 2016-02-11 00:18 +0100
              Re: First Program with Python! BartC <bc@freeuk.com> - 2016-02-11 00:07 +0000
          Re: First Program with Python! Kaz Kylheku <330-706-9395@kylheku.com> - 2016-02-15 16:58 +0000
        Re: First Program with Python! Richard Heathfield <rjh@cpax.org.uk> - 2016-02-10 21:51 +0000
          Re: First Program with Python! BartC <bc@freeuk.com> - 2016-02-11 00:15 +0000
  Re: First Program with Python! Kaz Kylheku <330-706-9395@kylheku.com> - 2016-02-15 16:46 +0000
    Re: First Program with Python! BartC <bc@freeuk.com> - 2016-02-15 17:31 +0000
      Re: First Program with Python! Richard Heathfield <rjh@cpax.org.uk> - 2016-02-15 20:16 +0000
        Re: First Program with Python! BartC <bc@freeuk.com> - 2016-02-15 22:45 +0000
          Re: First Program with Python! Kaz Kylheku <330-706-9395@kylheku.com> - 2016-02-16 03:40 +0000

csiph-web