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


Groups > comp.compilers > #1383

Re: OOP vs imperative, was Hello v1.0.3 distributed programming language available (alpha)

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end
From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.compilers
Subject Re: OOP vs imperative, was Hello v1.0.3 distributed programming language available (alpha)
Date Sun, 21 Sep 2014 13:40:01 GMT
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Lines 34
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <14-09-017@comp.compilers> (permalink)
References <14-09-016@comp.compilers>
NNTP-Posting-Host news.iecc.com
X-Trace miucha.iecc.com 1411309093 58483 2001:470:1f07:1126:0:676f:7373:6970 (21 Sep 2014 14:18:13 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Sun, 21 Sep 2014 14:18:13 +0000 (UTC)
Keywords OOP, design, history
Posted-Date 21 Sep 2014 10:18:13 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
X-Received-Bytes 2534
X-Received-Body-CRC 1672017722
Xref csiph.com comp.compilers:1383

Show key headers only | View raw


"Nils M Holm" <nmh@t3x.org> writes:
>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>> Smalltalk is an imperative language; e.g., it contains assignment and
>> its objects contain changeable state.  What makes you think that
>> Smalltalk is functional?
>
>While I would agree that Smalltalk is not intended to be a functional
>language, I think the argument of assignment and mutable state is not
>valid.

Why not?  It's how you know whether a language is imperative or
declarative.

>In "The Definition of Standard ML", Milner, et al describe ML as a
>functional language "in the sense that the full power of mathematical
>functions is present". IMO, this property is sufficient to classify a
>language as "functional". Even SML does have mutable state (references)
>and assignment, BTW.

So SML is an imperative language and a functional language then.
These days one tends to avoid that, because with mutable state, you
don't get referential transparency, and without referential
transparency, you miss out on some benefits of functional languages;
but in earlier times people did not know how to live without mutable
state, so they had mutable state in functional languages.  Quite a lot
in Lisp, less in ML, nothing in Haskell (or at least the imperative
stuff is encapsulated in a way that avoids destroying referential
transparency for the functional part).

- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/

Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: OOP vs imperative, was Hello v1.0.3 distributed programming language available (alpha) "Nils M Holm" <nmh@t3x.org> - 2014-09-20 02:19 -0400
  Re: OOP vs imperative, was Hello v1.0.3 distributed programming language available (alpha) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-09-21 13:40 +0000
    Re: OOP vs imperative, was Hello v1.0.3 distributed programming language available (alpha) Kaz Kylheku <kaz@kylheku.com> - 2014-09-21 14:28 +0000

csiph-web