Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion What is Expressiveness in a Computer Language [correction]
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andreas Rossberg  
View profile  
 More options Jun 28 2006, 5:56 am
Newsgroups: comp.lang.perl.misc, comp.lang.python, comp.lang.java.programmer, comp.lang.lisp, comp.lang.functional
From: Andreas Rossberg <rossb...@ps.uni-sb.de>
Date: Wed, 28 Jun 2006 11:56:39 +0200
Local: Wed, Jun 28 2006 5:56 am
Subject: Re: What is Expressiveness in a Computer Language [correction]

David Hopwood wrote:

>>>(defun blackhole (argument)
>>> (declare (ignore argument))
>>> #'blackhole)
> I believe this example requires recursive types. It can also be expressed
> in a gradual typing system, but possibly only using an unknown ('?') type.

> ISTR that O'Caml at one point (before version 1.06) supported general
> recursive types, although I don't know whether it would have supported
> this particular example.

No problem at all. It still is possible today if you really want:

   ~/> ocaml -rectypes
         Objective Caml version 3.08.3

   # let rec blackhole x = blackhole;;
   val blackhole : 'b -> 'a as 'a = <fun>

The problem is, though, that almost everything can be typed once you
have unrestricted recursive types (e.g. missing arguments etc), and
consequently many actual errors remain unflagged (which clearly shows
that typing is not only about potential value class mismatches).
Moreover, there are very few practical uses of such a feature, and they
can always be coded easily with recursive datatypes.

It is a pragmatic decision born from experience that you simply do *not
want* to have this, even though you easily could. E.g. for OCaml,
unrestricted recursive typing was removed as default because of frequent
user complaints.

Which is why this actually is a very bad example to chose for dynamic
typing advocacy... ;-)

- Andreas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.