Slices time complexity

Marko Rauhamaa marko at pacujo.net
Tue May 19 04:39:35 EDT 2015


Steven D'Aprano <steve+comp.lang.python at pearwood.info>:

>> What matters is the effect of a program. If two metaphysical
>> formulations of language semantics produce the same outcome, neither
>> is objectively better than the other.
>
> By outcome, do you mean the program's output?

Yes, the program's output, but also the interactions between program
parts.

> But the metaphysical formulation of the language is irrelevant to the
> program output. You can get the same output in Forth, Haskell, Prolog,
> C, Applescript or a Turing Machine, despite having radically different
> paradigms.

You misunderstood my point. A valid Python program would not produce the
same output when given to a Prolog interpreter (it would likely produce
a syntax error).

What I'm saying is that it doesn't matter what semantic description you
give Python constructs as long as the observed behavior is correct.

For example, you could explain Python's object references as pointers
(memory addresses) if you considered that helpful. (That's how Lisp
textbooks often explain cons cells.)


Marko



More information about the Python-list mailing list