Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:: [': 0.04; 'languages,': 0.04; 'abstraction': 0.09; 'logic': 0.09; 'modes': 0.09; 'sentence': 0.09; '\xa0we': 0.09; 'cc:addr:python-list': 0.11; 'random': 0.14; '67,': 0.16; 'andreas': 0.16; 'bullet': 0.16; 'cc:name:python list': 0.16; 'declared': 0.16; 'distinct': 0.16; 'fancy': 0.16; 'higher-level': 0.16; 'incomplete': 0.16; 'janssen': 0.16; 'lambda': 0.16; 'models,': 0.16; 'munich,': 0.16; 'paradigms': 0.16; 'personally,': 0.16; 'subject: \n ': 0.16; 'subject:OOP': 0.16; 'subject:object': 0.16; 'subject:possible': 0.16; 'subject:programming': 0.16; 'subject:type': 0.16; 'valid.': 0.16; '\xa0what': 0.16; 'language': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'bit': 0.19; 'mechanism': 0.19; 'subject:] ': 0.20; 'seems': 0.21; '8bit%:5': 0.22; 'machine': 0.22; '>>>': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'instead.': 0.24; 'logical': 0.24; 'oriented': 0.24; "shouldn't": 0.24; 'germany': 0.24; 'cheers,': 0.24; '(or': 0.24; 'cc:no real name:2**0': 0.24; 'second': 0.26; 'subject:/': 0.26; 'url:edu': 0.26; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; 'wonder': 0.29; "doesn't": 0.30; 'cc:2**2': 0.30; 'programming.': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; '(which': 0.31; 'gives': 0.31; 'that.': 0.31; 'dimensions': 0.31; 'layer': 0.31; 'purely': 0.31; 'styles': 0.31; 'url:wikipedia': 0.31; 'view.': 0.31; 'writes:': 0.31; 'languages': 0.32; 'skip:m 30': 0.32; 'says': 0.33; 'announce': 0.33; 'style': 0.33; 'sense': 0.34; 'there,': 0.34; 'could': 0.34; 'problem': 0.35; 'received:209.85': 0.35; 'common': 0.35; 'connection': 0.35; 'except': 0.35; 'possible.': 0.35; 'something': 0.35; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'building': 0.35; 'there': 0.35; 'false': 0.36; 'picking': 0.36; 'programming,': 0.36; 'science,': 0.36; 'url:listinfo': 0.36; 'shows': 0.36; 'useful': 0.36; 'url:org': 0.36; 'should': 0.36; 'so,': 0.37; 'turn': 0.37; 'two': 0.37; 'list': 0.37; 'level': 0.37; 'received:209': 0.37; 'easily': 0.37; 'being': 0.38; 'skip:& 10': 0.38; 'machines': 0.38; 'others.': 0.38; 'somebody': 0.38; 'anything': 0.39; 'skip:& 20': 0.39; 'does': 0.39; 'first': 0.61; 'kind': 0.63; 'became': 0.64; 'subject:The': 0.64; 'interest': 0.64; 'more': 0.64; 'different': 0.65; 'teach': 0.65; 'side': 0.67; 'between': 0.67; 'six': 0.68; 'design.': 0.68; 'nobody': 0.68; 'wish': 0.70; 'food': 0.72; 'surprise': 0.74; 'theoretical': 0.74; '1980s': 0.84; 'action.': 0.84; 'category.': 0.84; 'foundations': 0.84; 'fourth': 0.84; 'munich': 0.84; 'calculus': 0.91; 'died': 0.91; 'mistake': 0.91; '\xa0there': 0.91; 'relating': 0.93; 'you).': 0.95; 'obtained': 0.96; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=mHxXHKaOwZyIl+7hNjeZ3RmszaktCD9X3VyHGLlXPSM=; b=VAlminEFiGqgKCfbDf6Ou9Zg39TlP0vkuNbrqmLB3KNUpHzXFSeLgle+giQiZXZvZC Yvl6tMF/X6puuXVtovGjm5MCnYzd45RN8G7LKcGjqQlPJm53ya5TbUEPDNX8yBgGNsDq n1BOS8oqkqhnu7TZXx1oIj30gt6LmERZtDzlyRRaQBXXmeZWcogA57OtNU7dnI/wAdti JRQ3m1diLBCyI8PjJ48cS9/pV0miaOdhZN3vc6WbgW1NEY0814cB/nuZP8DXHGQUhRoK BeX1qJYu8ANZuHk52R1bv5ikDNmY9ERS4R0xHwdvlrRy7mlXqEbpRTMAb/Am7cFUxYoz eJDA== MIME-Version: 1.0 X-Received: by 10.229.164.3 with SMTP id c3mr1800230qcy.124.1366310900535; Thu, 18 Apr 2013 11:48:20 -0700 (PDT) In-Reply-To: <516EB4D1.1020103@ifi.lmu.de> References: <20846.27580.375000.899631@gargle.gargle.HOWL> <516EB4D1.1020103@ifi.lmu.de> Date: Thu, 18 Apr 2013 13:48:20 -0500 Subject: Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages From: Jason Wilkins To: Andreas Abel Content-Type: multipart/alternative; boundary=bcaec554dcc4e1241204daa70bca Cc: types-list@lists.seas.upenn.edu, Uday S Reddy , Python List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 235 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366310910 news.xs4all.nl 2234 [2001:888:2000:d::a6]:56509 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43853 --bcaec554dcc4e1241204daa70bca Content-Type: text/plain; charset=ISO-8859-1 Warning, this is a bit of a rant. That paragraph from Wikipedia seems to be confused. It gives the fourth paradigm as "declarative" but then says "first order logic for logic programming". It seems somebody did an incomplete replacement of "declarative" for "logic". Wikipedia is often schizophrenic like that. Personally, I think that object oriented and logical programming only became official paradigms because there was a certain level of hype for them in the 1980s and nobody has thought to strike them off the list after the hype died down. Object-oriented, as constituted today, is just a layer of abstraction over imperative programming (or imperative style programming in functional languages, because objects require side-effects). What "object-oriented" language actually in use now isn't just an imperative language with fancy abstraction mechanisms? The problem with having declarative languages as a paradigm (which logical languages would be a part) is that it feels like it should be a "miscellaneous" category. Being declarative doesn't tell you much except that some machine is going to turn your descriptions of something into some kind of action. In logical programming it is a set of predicates, but it could just as easily be almost anything else. In a way all languages are "declarative", it is just that we have some standard interpretations of what is declared that are very common (imperative and functional). My wish is that the idea of there being four paradigms would be abandoned the same we the idea of four food groups has been abandoned (which may surprise some of you). We have more than four different modes of thinking when programming and some are much more important than others and some are subsets of others. We should teach students a more sophisticated view. Ironically Wikipedia also shows us this complexity. The programming language paradigm side bar actually reveals the wealth of different styles that are available. There is simply no clean and useful way to overlay the four paradigms over what we see there, so it should be abandoned because it gives students a false idea. On Wed, Apr 17, 2013 at 9:42 AM, Andreas Abel wrote: > [ The Types Forum, http://lists.seas.upenn.edu/** > mailman/listinfo/types-list] > > On 17.04.2013 11:30, Uday S Reddy wrote: > >> Mark Janssen writes: >> >> From: en.wikipedia.org: Programming_paradigm: >>> >>> "A programming paradigm is a fundamental style of computer >>> programming. There are four main paradigms: object-oriented, >>> imperative, functional and declarative. Their foundations are distinct >>> models of computation: Turing machine for object-oriented and >>> imperative programming, lambda calculus for functional programming, >>> and first order logic for logic programming." >>> >> > I removed the second sentence relating paradigms to computation models > and put it on the talk page instead. It does not make sense to connect > imperative programming to Turing machines like functional programming to > lambda calculus. A better match would be random access machines, but the > whole idea of a connection between a programming paradigm and a computation > model is misleading. > > > While I understand the interest in purely theoretical models, I wonder >>> two things: 1) Are these distinct models of computation valid? And, >>> 2) If so, shouldn't a theory of types announce what model of >>> computation they are working from? >>> >> >> These distinctions are not fully valid. >> >> - Functional programming, logic programming and imperative programming are >> three different *computational mechanisms*. >> >> - Object-orientation and abstract data types are two different ways of >> building higher-level *abstractions*. >> >> The authors of this paragraph did not understand that computational >> mechanisms and higher-level abstractions are separate, orthogonal >> dimensions >> in programming language design. All six combinations, obtained by >> picking a >> computational mechanism from the first bullet and an abstraction mechanism >> from the second bullet, are possible. It is a mistake to put >> object-orientation in the first bullet. Their idea of "paradigm" is vague >> and ill-defined. >> >> Cheers, >> Uday Reddy >> >> > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Theoretical Computer Science, University of Munich > Oettingenstr. 67, D-80538 Munich, GERMANY > > andreas.abel@ifi.lmu.de > http://www2.tcs.ifi.lmu.de/~**abel/ > --bcaec554dcc4e1241204daa70bca Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Warning, this is a bit of a rant.

That = paragraph from Wikipedia seems to be confused. =A0It gives the fourth parad= igm as "declarative" but then says "first order logic for lo= gic programming". =A0It seems somebody did an incomplete replacement o= f "declarative" for "logic". =A0Wikipedia is often schi= zophrenic like that.

Personally, I think that object oriented and logical program= ming only became official paradigms because there was a certain level of hy= pe for them in the 1980s and nobody has thought to strike them off the list= after the hype died down.

Object-oriented, as constituted today, is just a = layer of abstraction over imperative programming (or imperative style progr= amming in functional languages, because objects require side-effects). =A0W= hat "object-oriented" language actually in use now isn't just= an imperative language with fancy abstraction mechanisms?

The problem with having declarative languag= es as a paradigm (which logical languages would be a part) is that it feels= like it should be a "miscellaneous" category. =A0Being declarati= ve doesn't tell you much except that some machine is going to turn your= descriptions of something into some kind of action. =A0In logical programm= ing it is a set of predicates, but it could just as easily be almost anythi= ng else. =A0In a way all languages are "declarative", it is just = that we have some standard interpretations of what is declared that are ver= y common (imperative and functional).

My wish is that the idea of there bei= ng four paradigms would be abandoned the same we the idea of four food grou= ps has been abandoned (which may surprise some of you). =A0We have more tha= n four different modes of thinking when programming and some are much more = important than others and some are subsets of others. =A0We should teach st= udents a more sophisticated view.

Ironically Wikipedia also shows us this com= plexity. =A0The programming=A0language paradigm side bar actually reveals t= he wealth of=A0different=A0styles that are available. =A0There is simply no= clean and useful way to overlay the four paradigms over what we see there,= so it should be abandoned because it gives students a false idea.


On Wed,= Apr 17, 2013 at 9:42 AM, Andreas Abel <andreas.abel@ifi.lmu.de&= gt; wrote:
On 17.04.2013 11:30, Uday S Reddy wrote:
Mark Janssen writes:

From: =A0en.wikipedia= .org: Programming_paradigm:

"A programming paradigm is a fundamental style of computer
programming. There are four main paradigms: object-oriented,
imperative, functional and declarative. Their foundations are distinct
models of computation: Turing machine for object-oriented and
imperative programming, lambda calculus for functional programming,
and first order logic for logic programming."

I removed the second sentence relating paradigms to computation models
and put it on the talk page instead. =A0It does not make sense to connect i= mperative programming to Turing machines like functional programming to lam= bda calculus. =A0A better match would be random access machines, but the wh= ole idea of a connection between a programming paradigm and a computation m= odel is misleading.


While I understand the interest in purely theoretical models, I wonder
two things: =A01) =A0Are these distinct models of computation valid? =A0And= ,
2) If so, shouldn't a theory of types announce what model of
computation they are working from?

These distinctions are not fully valid.

- Functional programming, logic programming and imperative programming are<= br> three different *computational mechanisms*.

- Object-orientation and abstract data types are two different ways of
building higher-level *abstractions*.

The authors of this paragraph did not understand that computational
mechanisms and higher-level abstractions are separate, orthogonal dimension= s
in programming language design. =A0All six combinations, obtained by pickin= g a
computational mechanism from the first bullet and an abstraction mechanism<= br> from the second bullet, are possible. =A0It is a mistake to put
object-orientation in the first bullet. =A0Their idea of "paradigm&quo= t; is vague
and ill-defined.

Cheers,
Uday Reddy



--
Andreas Abel =A0<>< =A0 =A0 =A0Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel@i= fi.lmu.de
http://www2= .tcs.ifi.lmu.de/~abel/

--bcaec554dcc4e1241204daa70bca--