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


Groups > comp.lang.python > #43713

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <dreamingforward@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'programmer': 0.03; 'subject:: [': 0.04; 'languages,': 0.04; 'languages.': 0.04; 'model,': 0.05; 'compiler': 0.07; 'code"': 0.09; 'exception,': 0.09; 'high-level': 0.09; 'logic': 0.09; 'objects,': 0.09; 'oop,': 0.09; 'plug': 0.09; 'cc:addr:python- list': 0.11; 'language,': 0.12; 'translation': 0.12; 'benjamin': 0.16; 'c/c++': 0.16; 'cc:name:python list': 0.16; 'distinct': 0.16; 'garbage': 0.16; 'hardware.': 0.16; 'interpreter,': 0.16; 'java.': 0.16; 'lambda': 0.16; 'languages)': 0.16; 'layout,': 0.16; 'literature,': 0.16; 'models,': 0.16; 'rule.': 0.16; 'shot.': 0.16; 'sound,': 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; 'subtype': 0.16; 'types,': 0.16; 'underlying': 0.16; ':-)': 0.16; 'language': 0.16; 'subject:] ': 0.20; 'machine': 0.22; 'memory': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'features,': 0.24; "shouldn't": 0.24; 'fairly': 0.24; 'java': 0.24; 'cc:no real name:2**0': 0.24; 'academic': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'generally': 0.29; 'wonder': 0.29; 'programming.': 0.30; 'start,': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'reply.': 0.31; 'usually': 0.31; 'commonly': 0.31; 'purely': 0.31; 'types.': 0.31; 'lists': 0.32; 'languages': 0.32; 'quite': 0.32; 'community': 0.33; 'announce': 0.33; 'entirely': 0.33; 'style': 0.33; 'actual': 0.34; "i'd": 0.34; 'received:74.125.82': 0.34; 'basic': 0.35; 'classes': 0.35; 'late': 0.35; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'described': 0.36; 'in.': 0.36; 'much.': 0.36; 'programming,': 0.36; "i'll": 0.36; 'so,': 0.37; 'too': 0.37; 'two': 0.37; 'clear': 0.37; 'thank': 0.38; 'e.g.': 0.38; 'focused': 0.38; 'question,': 0.38; 'needed': 0.38; 'received:74.125': 0.39; 'functional': 0.39; 'sure': 0.39; 'skip:p 20': 0.39; 'how': 0.40; 'even': 0.60; 'most': 0.60; 'gone': 0.61; 'areas': 0.61; 'first': 0.61; 'discuss': 0.62; 'subject:The': 0.64; 'interest': 0.64; 'to:addr:gmail.com': 0.65; 'techniques': 0.66; 'between': 0.67; 'fact,': 0.69; 'obvious': 0.74; 'theoretical': 0.74; 'describes': 0.84; 'foundations': 0.84; 'studying': 0.84; 'textbook': 0.84; 'calculus': 0.91; 'washington': 0.93
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=NLgrVuYkKXSok//PPe4lfr+PzB75/ZUyYcN4DqInwT0=; b=FlDxLQGba2CDmqmUj0e9Q3sbAi+d35qZmiEP6s7uW2Poy5rRHpVWRtcJ3ytMa0UB8e ZSynPMw/z9DMqDc7bV6MFcTaIZ9cr5DTZsqGVSEG275NkcMLKVpqljvDVySfI1rlDLwu V1tWn+4DlSFfy0+qjh0UBbbuWhSvUBwJY7Ih2d7L9he92xSepho5A8bxys/iX1vFjbMK SI0rclh6+rg1tQIGdQkDCjwJx/oE78MryicJuRS9PKCX32N1DNGKVARDmFRGitWPBUTp gQHdBc8sKKirn7St1nKCRttJ6JbHB+z8UDTJmT1Cu61l1IX3opeMxrQMtoOUfR4yNQHR UFXA==
MIME-Version 1.0
X-Received by 10.180.39.207 with SMTP id r15mr7109972wik.16.1366154202507; Tue, 16 Apr 2013 16:16:42 -0700 (PDT)
In-Reply-To <CAOvMSvXy=iJhUtMfncv-RE3HQw+7DJO-M1-TaeAFFhnDe9mpUA@mail.gmail.com>
References <CAMjeLr_7A-NRtec=K_ZsjXA_oJHnD6+vpttz4Ma0vtDRbb+o2w@mail.gmail.com> <CAOvMSvXy=iJhUtMfncv-RE3HQw+7DJO-M1-TaeAFFhnDe9mpUA@mail.gmail.com>
Date Tue, 16 Apr 2013 16:16:42 -0700
Subject Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages
From Mark Janssen <dreamingforward@gmail.com>
To DeLesley Hutchins <delesley@gmail.com>
Content-Type text/plain; charset=ISO-8859-1
Cc types-list@lists.seas.upenn.edu, Python List <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.697.1366154203.3114.python-list@python.org> (permalink)
Lines 64
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1366154203 news.xs4all.nl 2711 [2001:888:2000:d::a6]:49706
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43713

Show key headers only | View raw


> I'm not quite sure I understand your question, but I'll give it a shot.  :-)

Thank you, and my apologies for my late reply.

> The C/C++ model, in which the types are anchored to the machine hardware, in
> the exception, not the rule.  In the academic literature,  "type theory" is
> almost entirely focused on studying abstract models of computation that are
> purely mathematical, and bear no resemblance to the underlying hardware.
> The lambda calculus is the most general, and most commonly used formalism,
> but there are many others; e.g. Featherweight Java provides a formal model
> of objects and classes as they are used in Java.

Understood, but I feel this is where theory has gone too far away from
reality.  Wikipedia (admittedly not an authoritative resource), lists
a clear distinction between languages rooted to the Turing machine,
and those rooted in lambda calculus:

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."

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?

You say the C/C++ model is the exception, but in the programmer
community (excepting web-based languages) it is the opposite.  The
machine model dominates.  In fact, I'm not even sure how Java
operates, but through some sorcery I don't want to take part in.

> "Types and Programming Languages", by Benjamin Pierce, is an excellent
> introductory textbook which describes how various language features,
> including objects, can be formalized.  If you are interested in OOP, Abadi
> and Cardelli's "Theory of Objects" is the obvious place to start, although
> I'd recommend reading Pierce's book first if you want to understand it.  :-)
> Abadi and Cardelli discuss both class-based languages, and pure object
> languages.  If you are interested in the type/object distinction in
> particular, then I'll shamelessly plug my own thesis: "Pure Subtype Systems"
> (available online), which describes a formal model in which types are
> objects, and objects are types.  If you are familiar with the Self language,
> then you can think of it as a type system for Self.

Thank you very much.  I will look for them.

> Once you have a type system in place, it's usually fairly straightforward to
> compile a language down to actual hardware.  An interpreter, like that used
> in Python, is generally needed only for untyped or "dynamic" languages.
> There are various practical considerations -- memory layout, boxed or
> unboxed data types, garbage collection, etc. -- but the basic techniques are
> described in any compiler textbook.  Research in the areas of "typed
> assembly languages" and "proof carrying code" are concerned with ensuring
> that the translation from high-level language to assembly language is sound,
> and well-typed at all stages.

Very interesting.  I appreciate the those leads....
-- 
MarkJ
Tacoma, Washington

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages Mark Janssen <dreamingforward@gmail.com> - 2013-04-16 16:16 -0700

csiph-web