Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re4: MOPT-01 - assumptions and spaces

by mstone (Deacon)
on Dec 13, 2002 at 08:36 UTC ( #219533=note: print w/ replies, xml ) Need Help??


in reply to Re: Re2: MOPT-01 - assumptions and spaces
in thread MOPT-01 - assumptions and spaces

Each type of programming languages is based on a different computational model so your simulation has to be different as well.

I understand what you're saying, but I disagree with your point.. rather strongly, in fact.

One of the key assumptions in programming theory is Church's Thesis, which basically says that any two systems that can solve the same problem are structurally identical. Turing machines are identical to Mu-recursive grammars, are identical to Post systems, are identical to Lambda calculus, is identical to C, is identical to Perl, is identical to Lisp, etc, etc, etc.

The real difference between our positions is one of level. You're looking at languages from a high-level perspective, where C, Perl, and Lisp look very different. I'm looking at languages from a low-level perspective, where an addressable block of storage is an addressable block of storage, whether I call it x[1], $x[1], car(cdr(x)), or x_values(1).

Yes, different languages 'Huffmann code' operations differently. What's easy in Perl may be laborious in C, and vice versa. But if you really know how your low-level virtual computer works, you can, to quote merlyn, "speak Perl with a Lisp."

Technically, different programming languages are nothing more than dialects of the same low-level language. Procedural programming, Functional programming, and Object-Oriented programming all share a common heritage, and in future meditations I'll show just how much alike they all are.


Comment on Re4: MOPT-01 - assumptions and spaces
Re: Re4: MOPT-01 - assumptions and spaces
by Jenda (Abbot) on Dec 13, 2002 at 13:03 UTC

    I don't think the Church's Thesis says they are "structuraly identical". Even basicaly. It says they are identical in power. That's a totaly different thing!

    Only the procedural computation model is based on "adressable blocks of storage", on mutable variables. In the functional model you do NOT assign values to variables only to change them later, there's actually no notion of "later" in that model. You define "variables" in the mathematical sense, you define the functions as relations between the parameters and the result, but there's NO MEMORY to address.

    The reason why it's possible to "speak Perl with Lisp" is that Lisp is not purely functional. It allows you to leave the functional computation model! And then you can program the procedural way.

    I am NOT speaking about the difference between individual languages. I'm talking about the difference between computation models! And even though Perl does have some functional features it's basicaly procedural. And therefore in the lower levels equivalent to C or Pascal.

    Object Orientation doesn't actually fit into this discussion, it's just a syntactic sugar that alows you to tie the behaviour to the data more tightly, as far as the underlying model is concerned it's still procedural. Still based on "addressable memory blocks that are being modified by a sentence of statements".

    Jenda

    P.S.: I've been taught CS in Czech so if some of the terms look strange it's probably incorrect translation. Plus I did not have time to keep in touch with theoretical CS as I'd like to.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://219533]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2014-12-29 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (185 votes), past polls