17 May 15:05
full polymorphism in Pre-Scheme
From: James Long <james.long <at> coptix.com>
Subject: full polymorphism in Pre-Scheme
Newsgroups: gmane.lisp.scheme.scheme48
Date: 2008-05-17 13:08:42 GMT
Subject: full polymorphism in Pre-Scheme
Newsgroups: gmane.lisp.scheme.scheme48
Date: 2008-05-17 13:08:42 GMT
Hi, I have a few questions about Pre-Scheme's type system. I will be referencing the following paper as "the paper": Pre-Scheme: A Scheme Dialect for Systems Programming (http://citeseer.ist.psu.edu/196055.html ) and I am using Pre-Scheme from scheme48 v1.8. Note that I don't have much experience with type systems, this is just my first step in understanding them. I am interested in these problems because I would like to extend Pre-Scheme's type system to treat numbers with more granular interest, such as integer16 and integer32. ------ 1.The paper states that Pre-Scheme's type reconstruction algorithm supports 4 kinds of polymorphism, one of them being full polymorphism. The example case in the paper to illustrate this is one which would normally be rejected by basic type systems: (define (add-one x) (+ x 1)) (* (add-one 1.5) (vector-ref v (add-one 3))) I understand the polymorphic nature of the above expressions, and how full polymorphism would support this. The problem is that Pre-Scheme does *not* seem to support this, from pragmatic testing. The(Continue reading)
RSS Feed