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


Groups > comp.lang.python > #43871 > unrolled thread

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

Started byMark Janssen <dreamingforward@gmail.com>
First post2013-04-18 15:53 -0700
Last post2013-04-19 18:58 -0400
Articles 5 — 4 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages Mark Janssen <dreamingforward@gmail.com> - 2013-04-18 15:53 -0700
    Re: The type/object distinction and possible synthesis of OOP and imperative programming languages rusi <rustompmody@gmail.com> - 2013-04-18 20:35 -0700
      Re: The type/object distinction and possible synthesis of OOP and imperative programming languages Mark Janssen <dreamingforward@gmail.com> - 2013-04-18 20:58 -0700
      Re: The type/object distinction and possible synthesis of OOP and imperative programming languages Chris Angelico <rosuav@gmail.com> - 2013-04-19 17:05 +1000
      Re: The type/object distinction and possible synthesis of OOP and imperative programming languages Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-04-19 18:58 -0400

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

FromMark Janssen <dreamingforward@gmail.com>
Date2013-04-18 15:53 -0700
SubjectRe: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages
Message-ID<mailman.804.1366325597.3114.python-list@python.org>
On Mon, Apr 15, 2013 at 2:53 AM, Moez AbdelGawad <moezadel@outlook.com> wrote:
>> I'm not quite sure I understand your question, but I'll give it a shot.
>> :-)
>
> I'm in this same camp too :)

I am very thankful for the references given by everyone.
Unfortunately my library does not have the titles and it will be some
time before I can acquire them.  I hope it not too intrusive to offer
a few points that I've garnered from this conversation until I can
study the history further.

The main thing that I notice is that there is a heavy "bias" in
academia towards mathematical models.  I understand that Turing
Machines, for example, were originally abstract computational concepts
before there was an implementation in hardware, so I have some
sympathies with that view, yet, should not the "Science" of "Computer
Science" concern itself with how to map these abstract computational
concepts into actual computational hardware?  Otherwise, why not keep
the field within mathematics and philosophy (where Logic traditionally
has been)?   I find it remarkable, for example, that the simple
continued application of And/Or/Not gates can perform all the
computation that C.S. concerns itself with and these form the basis
for computer science in my mind, along with Boolean logic.  (The
implementation of digital logic into physical hardware is where C.S.
stops and Engineering begins, I would argue.)

But still, it seems that there are two ends, two poles, to the whole
computer science enterprise that haven't been sufficiently *separated*
so that they can be appreciated:  logic gates vs. logical "calculus"
and symbols.   There is very little crossover as I can see.  Perhaps
the problem is the common use of the Greek root "logikos"; in the
former, it pertains to binary arithmetic, where in the latter, it
retains it's original Greek pertaining to *speech* and symbols,
"logos").  Further, one can notice that in the former, the progression
has been towards more sophisticated Data Structures (hence the
evolution towards Object-Orientation), where in the latter (I'm
guessing, since it's not my area of expertise) the progression has
been towards function sophistication (where recursion seems to be
paramount).

In any case, I look forward to diving into the books and references
you've all offered so generously so that I can appreciate the field
and its history better.

Mark Janssen
Pacific Lutheran University
Tacoma, Washington

[toc] | [next] | [standalone]


#43881 — Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

Fromrusi <rustompmody@gmail.com>
Date2013-04-18 20:35 -0700
SubjectRe: The type/object distinction and possible synthesis of OOP and imperative programming languages
Message-ID<10511876-84bf-41f5-ad96-cf4ee5a6973e@di5g2000pbc.googlegroups.com>
In reply to#43871
On Apr 19, 3:53 am, Mark Janssen <dreamingforw...@gmail.com> wrote:
> On Mon, Apr 15, 2013 at 2:53 AM, Moez AbdelGawad <moeza...@outlook.com> wrote:
> >> I'm not quite sure I understand your question, but I'll give it a shot.
> >> :-)
>
> > I'm in this same camp too :)
>
> I am very thankful for the references given by everyone.
> Unfortunately my library does not have the titles and it will be some
> time before I can acquire them.  I hope it not too intrusive to offer
> a few points that I've garnered from this conversation until I can
> study the history further.


You may want to see this: http://www.infoq.com/presentations/Functional-Thinking


>
> The main thing that I notice is that there is a heavy "bias" in
> academia towards mathematical models.

Yeah wonderful observation. Lets clean up!

If I have a loop:

 while i < len(a) and a[i] != x:
   i++

I need to understand that at the end of the loop:
i >= len(a) or a[i] == x
and not
i >= len(a) and a[i] == x
nor
i == len(a) or a[i] == x  # What if I forgot to initialize i?

Now why bother to teach students such a silly thing (and silly name)
as deMorgan?

So all hail to your project of cleaning up the useless math from CS.
And to whet your appetite for the grandeur and glory of your
visionings why not start with making music schools enroll tone-deaf
students?  Why wasn't Beethoven deaf?

>  I understand that Turing
> Machines, for example, were originally abstract computational concepts
> before there was an implementation in hardware, so I have some
> sympathies with that view, yet, should not the "Science" of "Computer
> Science" concern itself with how to map these abstract computational
> concepts into actual computational hardware?  Otherwise, why not keep
> the field within mathematics and philosophy (where Logic traditionally
> has been)?   I find it remarkable, for example, that the simple
> continued application of And/Or/Not gates can perform all the
> computation that C.S. concerns itself with and these form the basis
> for computer science in my mind, along with Boolean logic.  (The
> implementation of digital logic into physical hardware is where C.S.
> stops and Engineering begins, I would argue.)

You need to study some history (or is that irrelevant like math?)
The Turing who invented the Turing machine in 1936 led the code-
cracking efforts of the allies a couple of years later.
Do you allow for the fact that he may have had abilities that were
common to both aka 'math' 'theory' etc?
Or do you believe that winning wars is a theoretical and irrelevant
exercise?

>
> But still, it seems that there are two ends, two poles, to the whole
> computer science enterprise that haven't been sufficiently *separated*
> so that they can be appreciated:  logic gates vs. logical "calculus"
> and symbols.   There is very little crossover as I can see.  Perhaps
> the problem is the common use of the Greek root "logikos"; in the
> former, it pertains to binary arithmetic, where in the latter, it
> retains it's original Greek pertaining to *speech* and symbols,
> "logos").


Yes there is some truth in what you say.  Just call it logic as object-
language (what you call logic-gates) and logic as meta-language ie
logic for reasoning
[the above line is not sarcastic]



> Further, one can notice that in the former, the progression
> has been towards more sophisticated Data Structures (hence the
> evolution towards Object-Orientation), where in the latter (I'm
> guessing, since it's not my area of expertise) the progression has
> been towards function sophistication (where recursion seems to be
> paramount).

Also good to study the views of one of the doyens of OOP:
http://en.wikipedia.org/wiki/Alexander_Stepanov#Criticism_of_OOP

[toc] | [prev] | [next] | [standalone]


#43883 — Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

FromMark Janssen <dreamingforward@gmail.com>
Date2013-04-18 20:58 -0700
SubjectRe: The type/object distinction and possible synthesis of OOP and imperative programming languages
Message-ID<mailman.811.1366343902.3114.python-list@python.org>
In reply to#43881
>> The main thing that I notice is that there is a heavy "bias" in
>> academia towards mathematical models.
>
> Yeah wonderful observation. Lets clean up!
>
> If I have a loop:
>
>  while i < len(a) and a[i] != x:
>    i++
>
> I need to understand that at the end of the loop:
> i >= len(a) or a[i] == x
> and not
> i >= len(a) and a[i] == x
> nor
> i == len(a) or a[i] == x  # What if I forgot to initialize i?

You know in my world, we have what's called Input/Output, rather than
punchcards or switchbanks where you come from.  Why not:  "print
i,a[i]".  Done!

> Now why bother to teach students such a silly thing (and silly name)
> as deMorgan?

Well deMorgan falls into BooleanLogic which I'm arguing is distinct
from the the mathematical realm where the lambda calculus wizards come
from.  So that's my camp, thanks.

> So all hail to your project of cleaning up the useless math from CS.

Yes, on useless math, no on *useful* math.  Thanks.

> And to whet your appetite for the grandeur and glory of your
> visionings why not start with making music schools enroll tone-deaf
> students?  Why wasn't Beethoven deaf?

Beethoven was deaf.

> You need to study some history (or is that irrelevant like math?)
> The Turing who invented the Turing machine in 1936 led the code-
> cracking efforts of the allies a couple of years later.
> Do you allow for the fact that he may have had abilities that were
> common to both aka 'math' 'theory' etc?
> Or do you believe that winning wars is a theoretical and irrelevant
> exercise?

Please, I don't dismiss math anymore than a number theorist might
dismiss the realm of complex numbers.

> Yes there is some truth in what you say.  Just call it logic as object-
> language (what you call logic-gates) and logic as meta-language ie
> logic for reasoning

Right, and I'm arguing that there hasn't been enough conceptual
separation between the two.  So why are you arguing?

> Also good to study the views of one of the doyens of OOP:
> http://en.wikipedia.org/wiki/Alexander_Stepanov#Criticism_of_OOP

That's a very good reference.  It voices some of my points that are in
criticism of python's object architecture.
-- 
MarkJ
Tacoma, Washington

[toc] | [prev] | [next] | [standalone]


#43888 — Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

FromChris Angelico <rosuav@gmail.com>
Date2013-04-19 17:05 +1000
SubjectRe: The type/object distinction and possible synthesis of OOP and imperative programming languages
Message-ID<mailman.815.1366355144.3114.python-list@python.org>
In reply to#43881
On Fri, Apr 19, 2013 at 1:35 PM, rusi <rustompmody@gmail.com> wrote:
> If I have a loop:
>
>  while i < len(a) and a[i] != x:
>    i++
>
> I need to understand that at the end of the loop:
> i >= len(a) or a[i] == x
> and not
> i >= len(a) and a[i] == x
> nor
> i == len(a) or a[i] == x  # What if I forgot to initialize i?

Or your program has crashed out with an exception.

>>> i,a,x=-10,"test","q"
>>> while i < len(a) and a[i] != x:
	i+=1

Traceback (most recent call last):
  File "<pyshell#69>", line 1, in <module>
    while i < len(a) and a[i] != x:
IndexError: string index out of range

Or if that had been in C, it could have bombed with a segfault rather
than a nice tidy exception. Definitely initialize i.

But yeah, the basis of algebra is helpful, even critical, to
understanding most expression evaluators.

ChrisA

[toc] | [prev] | [next] | [standalone]


#43937 — Re: The type/object distinction and possible synthesis of OOP and imperative programming languages

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2013-04-19 18:58 -0400
SubjectRe: The type/object distinction and possible synthesis of OOP and imperative programming languages
Message-ID<mailman.842.1366412317.3114.python-list@python.org>
In reply to#43881
On Thu, 18 Apr 2013 20:58:20 -0700, Mark Janssen
<dreamingforward@gmail.com> declaimed the following in
gmane.comp.python.general:

> Beethoven was deaf.
>
	Only in the last years...
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web