[27983] in Perl-Users-Digest
Perl-Users Digest, Issue: 9347 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 22 18:10:16 2006
Date: Thu, 22 Jun 2006 15:10:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 22 Jun 2006 Volume: 10 Number: 9347
Today's topics:
Re: What is Expressiveness in a Computer Language <cfc@shell01.TheWorld.com>
Re: What is Expressiveness in a Computer Language <jo@durchholz.org>
Re: What is Expressiveness in a Computer Language <jo@durchholz.org>
Re: What is Expressiveness in a Computer Language <jo@durchholz.org>
Re: What is Expressiveness in a Computer Language rossberg@ps.uni-sb.de
Re: What is Expressiveness in a Computer Language <claudio.grondi@freenet.de>
Re: What is Expressiveness in a Computer Language <cdsmith@twu.net>
Re: What is Expressiveness in a Computer Language <timo.stamm@arcor.de>
Re: What is Expressiveness in a Computer Language <david.nospam.hopwood@blueyonder.co.uk>
Re: What is Expressiveness in a Computer Language <benjamin.franksen@bessy.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 22 Jun 2006 15:12:56 -0400
From: Chris F Clark <cfc@shell01.TheWorld.com>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <sddhd2dvwav.fsf@shell01.TheWorld.com>
Pascal Costanza wrote:
> Consider a simple expression like 'a + b': In a dynamically typed
> language, all I need to have in mind is that the program will attempt to
> add two numbers. In a statically typed language, I additionally need to
> know that there must a guarantee that a and b will always hold numbers.
"Marshall" <marshall.spight@gmail.com> replied:
> I would not expect that the dynamic programmer will be
> thinking that this code will have two numbers most of the
> time but sometimes not, and fail. I would expect that in both
> static and dynamic, the thought is that that code is adding
> two numbers, with the difference being the static context
> gives one a proof that this is so.
I don't think the the problem is down at the atom level. It's really
at the structure (tuple) level. If we view 'a + b' as applying the
function + to some non-atomic objects a and b. The question is how
well do we specify what a and b are. From my limited exposure to
programs that use dynamic typing, I would surmise that developers who
use dynamic typing have very broad and open definitions of the "types"
of a and b, and they don't want the type system complaining that they
have nailed the definitions down quite yet. And, if you read some of
the arguments in this topic, one assumes that they want to even be
able to correct the "types" of a and b at run-time, when they find out
that they have made a mistake without taking the system down.
So, for a concrete example, let b be a "file" type (either text file
or directory) and we get a whole system up and running with those two
types. But, we discover a need for "symbolic links". So, we want to
change the file type to have 3 sub-types. In a dynamic type system,
because the file "type" is loose (it's operationally defined by what
function one applies to b), this isn't an issue. As each function is
recoded to deal with the 3rd sub-type, the program becomes more
functional. If we need to demo the program before we have worked out
how symbolic links work for some operation, it is not a problem. Run
the application, but don't exercise that combination of type and
operation.
In many ways, this can also be done in languages with type inference.
I don't understand the process by which one does it, so I can't
explain it. Perhaps someone else will--please....
Back to the example, the file type is not an atomic type, but
generally some structure/tuple/list/record/class with members or
fields. A function which renames files by looking at only the name
field may work perfectly adequately with the new symbolic link subtype
without change because the new subtype has the same name field and
uses it the same way. A spell-check function which works on text
files using the "contents" field might need to be recoded for symbolic
links if the contents field for that subtype is "different" (e.g. the
name of the target). The naive spell check function might appear to
work, but really do the wrong thing, (i.e. checking if the target file
name is made of legal words). Thus, the type problems are not at the
atomic level (where contents is a string), but at the structure level,
where one needs to know which fields have which meanings for which
subtypes.
-Chris
------------------------------
Date: Thu, 22 Jun 2006 21:51:37 +0200
From: Joachim Durchholz <jo@durchholz.org>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <e7esks$1hk$1@online.de>
Marshall schrieb:
> immutable = can't change
> vary-able = can change
>
> Clearly a contradiction in terms.
Not in mathematics.
The understanding there is that a "variable" varies - not over time, but
according to the whim of the usage. (E.g. if a function is displayed in
a graph, the parameter varies along the X axis. If it's used within a
term, the parameter varies depending on how it's used. Etc.)
Similarly for computer programs.
Of course, if values are immutable, the value associated with a
parameter name cannot vary within the same invocation - but it can still
vary from one invocation to the next.
Regards,
Jo
------------------------------
Date: Thu, 22 Jun 2006 21:59:21 +0200
From: Joachim Durchholz <jo@durchholz.org>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <e7et3c$2bd$1@online.de>
Andreas Rossberg schrieb:
> Joachim Durchholz wrote:
>>>
>>>> It's worth noting, too, that (in some sense) the type of an object
>>>> can change over time[*].
>>>
>>> No. Since a type expresses invariants, this is precisely what may
>>> *not* happen.
>>
>> No. A type is a set of allowable values, allowable operations, and
>> constraints on the operations (which are often called "invariants" but
>> they are invariant only as long as the type is invariant).
>
> The purpose of a type system is to derive properties that are known to
> hold in advance.
That's just one of many possible purposes (a noble one, and the most
preeminent one in FPLs I'll agree any day, but it's still *not the
definition of a type*).
> A type is the encoding of these properties. A type
> varying over time is an inherent contradiction (or another abuse of the
> term "type").
No. It's just a matter of definition, essentially.
E.g. in Smalltalk and Lisp, it does make sense to talk of the "type" of
a name or a value, even if that type may change over time.
I regard it as a highly dubious practice to have things change their
types over their lifetime, but if there are enough other constraints,
type constancy may indeed have to take a back seat.
Regards,
Jo
------------------------------
Date: Thu, 22 Jun 2006 22:01:52 +0200
From: Joachim Durchholz <jo@durchholz.org>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <e7et83$2bd$2@online.de>
Andreas Rossberg schrieb:
> (Btw, Pascal did not have it either, AFAIK)
Indeed.
Some Pascal dialects have it.
Regards,
Jo
------------------------------
Date: 22 Jun 2006 14:02:20 -0700
From: rossberg@ps.uni-sb.de
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <1151010139.960608.122470@b68g2000cwa.googlegroups.com>
Joachim Durchholz wrote:
>
> > A type is the encoding of these properties. A type
> > varying over time is an inherent contradiction (or another abuse of the
> > term "type").
>
> No. It's just a matter of definition, essentially.
> E.g. in Smalltalk and Lisp, it does make sense to talk of the "type" of
> a name or a value, even if that type may change over time.
OK, now we are simply back full circle to Chris Smith's original
complaint that started this whole subthread, namely (roughly) that
long-established terms like "type" or "typing" should *not* be
stretched in ways like this, because that is technically inaccurate and
prone to misinterpretation.
- Andreas
------------------------------
Date: Thu, 22 Jun 2006 23:03:44 +0200
From: Claudio Grondi <claudio.grondi@freenet.de>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <e7f0l7$jlt$1@newsreader2.netcologne.de>
Xah Lee wrote:
> in March, i posted a essay “What is Expressiveness in a Computer
> Language”, archived at:
> http://xahlee.org/perl-python/what_is_expresiveness.html
>
> I was informed then that there is a academic paper written on this
> subject.
>
> On the Expressive Power of Programming Languages, by Matthias
> Felleisen, 1990.
> http://www.ccs.neu.edu/home/cobbe/pl-seminar-jr/notes/2003-sep-26/expressive-slides.pdf
>
> Has anyone read this paper? And, would anyone be interested in giving a
> summary?
>
> thanks.
>
> Xah
> xah@xahlee.org
> ∑ http://xahlee.org/
>
Looking this thread growing it appears to me, that at least one thing
becomes evident here:
Xah unwillingness to learn from the bad past experience contaminates
others (who are still posting to his trolling threads).
Here another try to rescue these ones who are just virgin enough not to
know what I am speaking about:
Citation from http://www.xahlee.org/Netiquette_dir/_/art_trolling.html :
"""
What I want this document to focus on is how to create entertaining
trolls. I have drawn on the expertise of the writer's of some of
Usenet's finest and best remembered trolls. Trolls are for fun. The
object of recreational trolling is to sit back and laugh at all those
gullible idiots that will believe *anything*.
[...]
Section 5 Know Your Audience
Remember that you have two audiences. The people who are going to get
the maximum enjoyment out of your post are other trollers. You need to
keep in contact with them through both your troll itself and the way you
direct its effect. It is trollers that you are trying to entertain so be
creative - trollers don't just want a laugh from you they want to see
good trolls so that they can also learn how to improve their own in the
never ending search for the perfect troll.
[...]
Section 6 Following-Up
Try not to follow-up to your own troll. The troll itself quickly becomes
forgotten in the chaos and if you just sit back you can avoid being
blamed for causing it. Remember, if you do follow up you are talking to
an idiot. Treat them with the ill-respect they deserve.
"""
Claudio Grondi (a past 'gullible idiot' who learned to enjoy the fun of
being the audience)
------------------------------
Date: Thu, 22 Jun 2006 15:08:39 -0600
From: Chris Smith <cdsmith@twu.net>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <MPG.1f04b4c5169cbb149896e3@news.altopia.net>
Claudio Grondi <claudio.grondi@freenet.de> wrote:
> Looking this thread growing it appears to me, that at least one thing
> becomes evident here:
>
> Xah unwillingness to learn from the bad past experience contaminates
> others (who are still posting to his trolling threads).
>
> Here another try to rescue these ones who are just virgin enough not to
> know what I am speaking about:
I am enjoying the discussion. I think several other people are, too.
(At least, I hope so!) It matters not one whit to me who started the
thread, or the merits of the originating post. Why does it matter to
you?
--
Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation
------------------------------
Date: Thu, 22 Jun 2006 23:12:25 +0200
From: Timo Stamm <timo.stamm@arcor.de>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <449b07bb$0$11073$9b4e6d93@newsread4.arcor-online.net>
Claudio Grondi schrieb:
> Looking this thread growing it appears to me, that at least one thing
> becomes evident here:
>
> Xah unwillingness to learn from the bad past experience contaminates
> others (who are still posting to his trolling threads).
This is actually one of the most interesting threads I have read in a
long time. If you ignore the evangelism, there is a lot if high-quality
information and first-hand experience you couldn't find in a dozen books.
------------------------------
Date: Thu, 22 Jun 2006 21:35:35 GMT
From: David Hopwood <david.nospam.hopwood@blueyonder.co.uk>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <H2Emg.472606$xt.82611@fe3.news.blueyonder.co.uk>
Rob Thorpe wrote:
> David Hopwood wrote:
>
>>As far as I can tell, the people who advocate using "typed" and "untyped"
>>in this way are people who just want to be able to discuss all languages in
>>a unified terminological framework, and many of them are specifically not
>>advocates of statically typed languages.
>
> Its easy to create a reasonable framework. My earlier posts show simple
> ways of looking at it that could be further refined, I'm sure there are
> others who have already done this.
>
> The real objection to this was that latently/dynamically typed
> languages have a place in it.
You seem to very keen to attribute motives to people that are not apparent
from what they have said.
> But some of the advocates of statically
> typed languages wish to lump these languages together with assembly
> language a "untyped" in an attempt to label them as unsafe.
A common term for languages which have defined behaviour at run-time is
"memory safe". For example, "Smalltalk is untyped and memory safe."
That's not too objectionable, is it?
(It is actually more common for statically typed languages to fail to be
memory safe; consider C and C++, for example.)
--
David Hopwood <david.nospam.hopwood@blueyonder.co.uk>
------------------------------
Date: Thu, 22 Jun 2006 23:47:22 +0200
From: Benjamin Franksen <benjamin.franksen@bessy.de>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <e7f35a$drq$1@ulysses.news.tiscali.de>
George Neuner wrote:
> The point is really that the checks that prevent these things
[such as 'array index out of bounds']
> must be
> performed at runtime and can't be prevented by any practical type
> analysis performed at compile time. I'm not a type theorist but my
> opinion is that a static type system that could, a priori, prevent the
> problem is impossible.
It is not impossible. Dependent type systems can -- in principle -- do all
such things. Take a look at Epigram (http://www.e-pig.org/).
Systems based on dependent types such as Epigram are not yet mature enough
to be used for serious programming. However, they clearly show that these
things /are/ possible.
Cheers
Ben
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 9347
***************************************