[27953] in Perl-Users-Digest
Perl-Users Digest, Issue: 9317 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 19 18:10:14 2006
Date: Mon, 19 Jun 2006 15:10:07 -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 Mon, 19 Jun 2006 Volume: 10 Number: 9317
Today's topics:
Re: What is Expressiveness in a Computer Language <find@my.address.elsewhere>
Re: What is Expressiveness in a Computer Language <goofball@vapornet.com>
Re: What is Expressiveness in a Computer Language <find@my.address.elsewhere>
Re: What is Expressiveness in a Computer Language <pc@p-cos.net>
Re: What is Expressiveness in a Computer Language <pc@p-cos.net>
Re: What is Expressiveness in a Computer Language <cdsmith@twu.net>
Re: What is Expressiveness in a Computer Language <find@my.address.elsewhere>
Re: What is Expressiveness in a Computer Language <eval.apply@gmail.com>
Re: What is Expressiveness in a Computer Language <cdsmith@twu.net>
Re: What is Expressiveness in a Computer Language <marshall.spight@gmail.com>
Re: What is Expressiveness in a Computer Language <cdsmith@twu.net>
Re: XML Response customizing using PERL <trwww@sbcglobal.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 19 Jun 2006 13:09:28 -0500
From: Matthias Blume <find@my.address.elsewhere>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <m1zmg9ggpz.fsf@hana.uchicago.edu>
George Neuner <gneuner2/@comcast.net> writes:
> I am, however, going to ask what
> information you think type inference can provide that substitutes for
> algorithm or data structure exploration.
Nobody wants to do such a substitution, of course. In /my/
experience, however, I find that doing algorithm and data structure
exploration is greatly aided by a language with static types and type
inference. YMMV.
------------------------------
Date: Mon, 19 Jun 2006 18:21:56 +0000 (UTC)
From: Yet Another Dan <goofball@vapornet.com>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <Xns97E78835F267BakaHackerX@192.17.3.8>
Chris Smith <cdsmith@twu.net> wrote in
news:MPG.1f007f6a483b5e7d9896c6@news.altopia.net:
> Rob Thorpe <robert.thorpe@antenova.com> wrote:
>> A language is latently typed if a value has a property - called it's
>> type - attached to it, and given it's type it can only represent
>> values defined by a certain class.
>
> Now I define a class of values called "correct" values. I define
> these to be those values for which my program will produce acceptable
> results. Clearly there is a defined class of such values: (1) they
> are immediately defined by the program's specification for those lines
> of code that produce output; ...
> I'm not trying to poke holes in your definition for fun. I am
> proposing that there is no fundamental distinction between the kinds
> of problems that are "type problems" and those that are not.
That sounds like a lot to demand of a type system. It almost sounds like
it's supposed to test and debug the whole program. In general, defining the
exact set of values for a given variable that generate acceptable output
from your program will require detailed knowledge of the program and all
its possible inputs. That goes beyond simple typing. It sounds more like
contracts. Requiring an array index to be an integer is considered a typing
problem because it can be checked based on only the variable itself,
whereas checking whether it's in bounds requires knowledge about the array.
--
YAD
------------------------------
Date: Mon, 19 Jun 2006 13:24:47 -0500
From: Matthias Blume <find@my.address.elsewhere>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <m1veqxgg0g.fsf@hana.uchicago.edu>
"Rob Thorpe" <robert.thorpe@antenova.com> writes:
> I don't think dynamic typing is that nebulous. I remember this being
> discussed elsewhere some time ago, I'll post the same reply I did then
> ..
>
>
> A language is statically typed if a variable has a property - called
> it's type - attached to it, and given it's type it can only represent
> values defined by a certain class.
By this definition, all languages are statically typed (by making that
"certain class" the set of all values). Moreover, this "definition",
when read the way you probably wanted it to be read, requires some
considerable stretch to accommodate existing static type systems such
as F_\omega.
Perhaps better: A language is statically typed if its definition
includes (or ever better: is based on) a static type system, i.e., a
static semantics with typing judgments derivable by typing rules.
Usually typing judgmets associate program phrases ("expressions") with
types given a typing environment.
> A language is latently typed if a value has a property - called it's
> type - attached to it, and given it's type it can only represent values
> defined by a certain class.
This "definition" makes little sense. Any given value can obviously
only represent one value: itself. "Dynamic types" are nothing more
than sets of values, often given by computable predicates.
> Untyped and type-free mean something else: they mean no type checking
> is done.
Look up "untyped lambda calculus".
------------------------------
Date: Mon, 19 Jun 2006 20:34:33 +0200
From: Pascal Costanza <pc@p-cos.net>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <4fo91pF1jr7gpU1@individual.net>
Matthias Blume wrote:
> "Rob Thorpe" <robert.thorpe@antenova.com> writes:
>
>> I don't think dynamic typing is that nebulous. I remember this being
>> discussed elsewhere some time ago, I'll post the same reply I did then
>> ..
>>
>>
>> A language is statically typed if a variable has a property - called
>> it's type - attached to it, and given it's type it can only represent
>> values defined by a certain class.
>
> By this definition, all languages are statically typed (by making that
> "certain class" the set of all values). Moreover, this "definition",
> when read the way you probably wanted it to be read, requires some
> considerable stretch to accommodate existing static type systems such
> as F_\omega.
>
> Perhaps better: A language is statically typed if its definition
> includes (or ever better: is based on) a static type system, i.e., a
> static semantics with typing judgments derivable by typing rules.
> Usually typing judgmets associate program phrases ("expressions") with
> types given a typing environment.
How does your definition exclude the trivial type system in which the
only typing judgment states that every expression is acceptable?
Pascal
--
3rd European Lisp Workshop
July 3 - Nantes, France - co-located with ECOOP 2006
http://lisp-ecoop06.bknr.net/
------------------------------
Date: Mon, 19 Jun 2006 20:40:05 +0200
From: Pascal Costanza <pc@p-cos.net>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <4fo9c6F1k7pesU1@individual.net>
Chris Smith wrote:
> Pascal Costanza <pc@p-cos.net> wrote:
>> Types can be represented at runtime via type tags. You could insist on
>> using the term "dynamically tagged languages", but this wouldn't change
>> a lot. Exactly _because_ it doesn't make sense in a statically typed
>> setting, the term "dynamically typed language" is good enough to
>> communicate what we are talking about - i.e. not (static) typing.
>
> Okay, fair enough. It's certainly possible to use the same sequence of
> letters to mean two different things in different contexts. The problem
> arises, then, when Torben writes:
>
> : That's not really the difference between static and dynamic typing.
> : Static typing means that there exist a typing at compile-time that
> : guarantess against run-time type violations. Dynamic typing means
> : that such violations are detected at run-time.
>
> This is clearly not using the word "type" to mean two different things
> in different contexts. Rather, it is speaking under the mistaken
> impression that "static typing" and "dynamic typing" are varieties of
> some general thing called "typing." In fact, the phrase "dynamically
> typed" was invented to do precisely that. My argument is not really
> with LISP programmers talking about types, by which they would mean
> approximately the same thing Java programmers mean by "class." My point
> here concerns the confusion that results from the conception that there
> is this binary distinction (or continuum, or any other simple
> relationship) between a "statically typed" and a "dynamically typed"
> language.
There is an overlap in the sense that some static type systems cover
only types as sets of values whose correct use could as well be checked
dynamically.
Yes, it's correct that more advanced static type systems can provide
more semantics than that (and vice versa).
Pascal
--
3rd European Lisp Workshop
July 3 - Nantes, France - co-located with ECOOP 2006
http://lisp-ecoop06.bknr.net/
------------------------------
Date: Mon, 19 Jun 2006 13:17:15 -0600
From: Chris Smith <cdsmith@twu.net>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <MPG.1f00a629ba0b762d9896c9@news.altopia.net>
Pascal Costanza <pc@p-cos.net> wrote:
> How does your definition exclude the trivial type system in which the
> only typing judgment states that every expression is acceptable?
It is not necessary to exclude that trivial type system. Since it is
useless, no one will implement it. However, if pressed, I suppose one
would have to admit that that definition includes a type system that is
just useless.
I do, though, prefer Pierce's definition:
A type system is a tractable syntactic method for proving the
absence of certain program behaviors by classifying phrases
according to the kinds of values they compute.
(Benjamin Pierce, Types and Programming Languages, MIT Press, pg. 1)
Key words include:
- tractable: it's not sufficient to just evaluate the program
- syntactic: types are tied to the kinds of expressions in the language
- certain program behaviors: while perhaps confusing out of context,
there is nowhere in the book a specification of which program
behaviors may be prevented by type systems and which may not. In
context, the word "certain" there is meant to make it clear that type
systems should be able to specifically identify which behaviors they
prevent, and not that there is some universal set.
--
Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation
------------------------------
Date: Mon, 19 Jun 2006 14:21:19 -0500
From: Matthias Blume <find@my.address.elsewhere>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <m1r71lgde8.fsf@hana.uchicago.edu>
Pascal Costanza <pc@p-cos.net> writes:
> Matthias Blume wrote:
>> "Rob Thorpe" <robert.thorpe@antenova.com> writes:
>>
>>> I don't think dynamic typing is that nebulous. I remember this being
>>> discussed elsewhere some time ago, I'll post the same reply I did then
>>> ..
>>>
>>>
>>> A language is statically typed if a variable has a property - called
>>> it's type - attached to it, and given it's type it can only represent
>>> values defined by a certain class.
>> By this definition, all languages are statically typed (by making
>> that
>> "certain class" the set of all values). Moreover, this "definition",
>> when read the way you probably wanted it to be read, requires some
>> considerable stretch to accommodate existing static type systems such
>> as F_\omega.
>> Perhaps better: A language is statically typed if its definition
>> includes (or ever better: is based on) a static type system, i.e., a
>> static semantics with typing judgments derivable by typing rules.
>> Usually typing judgmets associate program phrases ("expressions") with
>> types given a typing environment.
>
> How does your definition exclude the trivial type system in which the
> only typing judgment states that every expression is acceptable?
It does not.
------------------------------
Date: 19 Jun 2006 12:56:29 -0700
From: "Joe Marshall" <eval.apply@gmail.com>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <1150746989.489702.26290@i40g2000cwc.googlegroups.com>
Chris Smith wrote:
>
> Knowing that it'll cause a lot of strenuous objection, I'll nevertheless
> interject my plea not to abuse the word "type" with a phrase like
> "dynamically typed".
Allow me to strenuously object. The static typing community has its
own set of
terminology and that's fine. However, we Lisp hackers are not used to
this terminology.
It confuses us. *We* know what we mean by `dynamically typed', and we
suspect *you* do, too.
> This cleaner terminology eliminates a lot of confusion.
Hah! Look at the archives.
> This isn't just a matter of preference in terminology.
No?
> If types DON'T mean a compile-time method for proving the
> absence of certain program behaviors, then they don't mean anything at
> all.
Nonsense.
------------------------------
Date: Mon, 19 Jun 2006 14:23:46 -0600
From: Chris Smith <cdsmith@twu.net>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <MPG.1f00b5c17e12e5af9896ca@news.altopia.net>
Joe Marshall <eval.apply@gmail.com> wrote:
>
> Chris Smith wrote:
> >
> > Knowing that it'll cause a lot of strenuous objection, I'll nevertheless
> > interject my plea not to abuse the word "type" with a phrase like
> > "dynamically typed".
>
> Allow me to strenuously object. The static typing community has its
> own set of
> terminology and that's fine. However, we Lisp hackers are not used to
> this terminology.
> It confuses us. *We* know what we mean by `dynamically typed', and we
> suspect *you* do, too.
I know what you mean by types in LISP. The phrase "dynamically typed,"
though, was explicitly introduced as a counterpart to "statically
typed" in order to imply (falsely) that the word "typed" has related
meanings in those two cases. Nevertheless, I did not really object,
since it's long since passed into common usage, until Torben attempted
to give what I believe are rather meaningless definitions to those
words, in terms of some mythical thing called "type violations" that he
seems to believe exist apart from any specific type systems.
(Otherwise, how could you define kinds of type systems in terms of when
they catch type violations?)
> > This cleaner terminology eliminates a lot of confusion.
>
> Hah! Look at the archives.
I'm not sure what you mean here. You would like me to look at the
archives of which of the five groups that are part of this conversation?
In any case, the confusion I'm referring to pertains to comparison of
languages, and it's already been demonstrated once in the half-dozen or
so responses to this branch of this thread.
> > If types DON'T mean a compile-time method for proving the
> > absence of certain program behaviors, then they don't mean anything at
> > all.
>
> Nonsense.
Please accept my apologies for not making the context clear. I tried to
clarify, in my response to Pascal, that I don't mean that the word
"type" can't have any possible meaning except for the one from
programming language type theory. I should modify my statement as
follows:
An attempt to generalize the definition of "type" from programming
language type theory to eliminate the requirement that they are
syntactic in nature yields something meaningless. Any concept of
"type" that is not syntactic is a completely different thing from
static types.
Basically, I start objecting when someone starts comparing "statically
typed" and "dynamically typed" as if they were both varieties of some
general concept called "typed". They aren't. Furthermore, these two
phrases were invented under the misconception that that are. If you
mean something else by types, such as the idea that a value has a tag
indicating its range of possible values, then I tend to think it would
be less confusing to just say "type" and then clarify the meaning it
comes into doubt, rather than adopting language that implies that those
types are somehow related to types from type theory.
--
Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation
------------------------------
Date: 19 Jun 2006 13:41:10 -0700
From: "Marshall" <marshall.spight@gmail.com>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <1150749670.053433.242210@p79g2000cwp.googlegroups.com>
Chris Smith wrote:
>
> Basically, I start objecting when someone starts comparing "statically
> typed" and "dynamically typed" as if they were both varieties of some
> general concept called "typed". They aren't. Furthermore, these two
> phrases were invented under the misconception that that are. If you
> mean something else by types, such as the idea that a value has a tag
> indicating its range of possible values, then I tend to think it would
> be less confusing to just say "type" and then clarify the meaning it
> comes into doubt, rather than adopting language that implies that those
> types are somehow related to types from type theory.
While I am quite sympathetic to this point, I have to say that
this horse left the barn quite some time ago.
Marshall
PS. Hi Chris!
------------------------------
Date: Mon, 19 Jun 2006 14:56:26 -0600
From: Chris Smith <cdsmith@twu.net>
Subject: Re: What is Expressiveness in a Computer Language
Message-Id: <MPG.1f00bd6458e102849896cb@news.altopia.net>
Marshall <marshall.spight@gmail.com> wrote:
> While I am quite sympathetic to this point, I have to say that
> this horse left the barn quite some time ago.
I don't think so. Perhaps it's futile to go scouring the world for uses
of the phrase "dynamic type" and eliminating them. It's not useless to
point out when the term is used in a particularly confusing way, though,
as when it's implied that there is some class of "type errors" that is
strictly a subset of the class of "errors". Terminology is often
confused for historical reasons, but incorrect statements eventually get
corrected.
> PS. Hi Chris!
Hi! Where are you posting from these days?
--
Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation
------------------------------
Date: Mon, 19 Jun 2006 19:50:38 GMT
From: "Todd W" <trwww@sbcglobal.net>
Subject: Re: XML Response customizing using PERL
Message-Id: <ieDlg.25771$VE1.6639@newssvr14.news.prodigy.com>
"dexteru2" <dakanbister@gmail.com> wrote in message
news:1150738860.609977.55980@r2g2000cwb.googlegroups.com...
> Hello All,
> Please can someone assist me on how to customize the output of XML
> response using perl.
>
> For example i have an output like this
>
> ......
> <methodResponse>
> <params>
> <param>
> <value>
> <struct>
> <member>
> <name>originHostName</name>
> <value>
> <string>WEB_HOST</string>
> </value>
> </member>
> .......
> .......
> </member>
> </struct>
> </value>
> </param>
> </params>
> </methodResponse>
>
>
>
> But i want the output to be like ;
>
> The hostname is WEB_HOST...And not in the default form as above.
>
Along with the other response, this XML looks like XML-RPC.
If so, I'm not sure why you would want to modify it. You want:
http://search.cpan.org/~rjray/RPC-XML-0.58/lib/RPC/XML/Client.pm
This module will prepare the request, send the request, and parse the
response so that all you see is perl data structures.
Todd W.
------------------------------
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 9317
***************************************