From: Aaron Sokoloski
Subject: Re: static typing
Date: 
Message-ID: <1154969313.901263.185710@p79g2000cwp.googlegroups.com>
Jeffery Zhang wrote:
> I've been learning Lisp since about Februrary, and I've implemeted some
> small projects (~300 lines) in lisp. I've built up a small library of
> utility functions and macros so things are going well.
>
> But there is a nagging thought at the back of my head. I miss static
> typing of languages like SML and Haskell. Specifically I miss things
> like type inference.. A lot of times I make small mistakes like
> forgetting the cdr returns a list and not an element. I feel like
> without static typing I have to keep the defintiions of the
> datastructures in my head, which is bad since I'm bad at remembering
> things. For typed languages a lot of editors can offer code completion
> based on type analysis, and warn when you pass the wrong type in.
> Sometimes when list structures get complicated I forget how I wrote it,
> I would like to be able to declare a type like list<integer> and get
> warned if I pass this to mapcar and some function whose input is not of
> type integer.
>
> Is there anything that does this?
>
> -Jeffery


I think that Qi may be what you're looking for:

http://www.lambdassociates.org/aboutqi.htm

>From the website -- what is Qi?

"A language implemented in Common Lisp that generates efficient type
secure Lisp programs which you can run on any machine."

--Aaron

From: Jeffery Zhang
Subject: Re: static typing
Date: 
Message-ID: <eb8lcc$ovk$1@ruby.cit.cornell.edu>
On 2006-08-07 11:48:34 -0500, "Aaron Sokoloski" <··········@gmail.com> said:

> 
> Jeffery Zhang wrote:
>> I've been learning Lisp since about Februrary, and I've implemeted some
>> small projects (~300 lines) in lisp. I've built up a small library of
>> utility functions and macros so things are going well.
>> 
>> But there is a nagging thought at the back of my head. I miss static
>> typing of languages like SML and Haskell. Specifically I miss things
>> like type inference.. A lot of times I make small mistakes like
>> forgetting the cdr returns a list and not an element. I feel like
>> without static typing I have to keep the defintiions of the
>> datastructures in my head, which is bad since I'm bad at remembering
>> things. For typed languages a lot of editors can offer code completion
>> based on type analysis, and warn when you pass the wrong type in.
>> Sometimes when list structures get complicated I forget how I wrote it,
>> I would like to be able to declare a type like list<integer> and get
>> warned if I pass this to mapcar and some function whose input is not of
>> type integer.
>> 
>> Is there anything that does this?
>> 
>> -Jeffery
> 
> 
> I think that Qi may be what you're looking for:
> 
> http://www.lambdassociates.org/aboutqi.htm
> 
>> From the website -- what is Qi?
> 
> "A language implemented in Common Lisp that generates efficient type
> secure Lisp programs which you can run on any machine."
> 
> --Aaron

Thanks so much for this link. Qi looks like the perfect combo of Lisp 
and ML. I miss pattern matching style function definitions. I should 
study macros more to rework the syntax. Turing equivalent type 
language, now that's simultaneously scary and interesting. I just hope 
they have a debugger for the type system.
From: Aaron Sokoloski
Subject: Re: static typing
Date: 
Message-ID: <1154998015.220394.200580@h48g2000cwc.googlegroups.com>
Jeffery Zhang wrote:
> On 2006-08-07 11:48:34 -0500, "Aaron Sokoloski" <··········@gmail.com> said:
>
> >
> > Jeffery Zhang wrote:
> >> I've been learning Lisp since about Februrary, and I've implemeted some
> >> small projects (~300 lines) in lisp. I've built up a small library of
> >> utility functions and macros so things are going well.
> >>
> >> But there is a nagging thought at the back of my head. I miss static
> >> typing of languages like SML and Haskell. Specifically I miss things
> >> like type inference.. A lot of times I make small mistakes like
> >> forgetting the cdr returns a list and not an element. I feel like
> >> without static typing I have to keep the defintiions of the
> >> datastructures in my head, which is bad since I'm bad at remembering
> >> things. For typed languages a lot of editors can offer code completion
> >> based on type analysis, and warn when you pass the wrong type in.
> >> Sometimes when list structures get complicated I forget how I wrote it,
> >> I would like to be able to declare a type like list<integer> and get
> >> warned if I pass this to mapcar and some function whose input is not of
> >> type integer.
> >>
> >> Is there anything that does this?
> >>
> >> -Jeffery
> >
> >
> > I think that Qi may be what you're looking for:
> >
> > http://www.lambdassociates.org/aboutqi.htm
> >
> >> From the website -- what is Qi?
> >
> > "A language implemented in Common Lisp that generates efficient type
> > secure Lisp programs which you can run on any machine."
> >
> > --Aaron
>
> Thanks so much for this link. Qi looks like the perfect combo of Lisp
> and ML. I miss pattern matching style function definitions. I should
> study macros more to rework the syntax. Turing equivalent type
> language, now that's simultaneously scary and interesting. I just hope
> they have a debugger for the type system.

Glad it's what you're looking for.  I haven't looked into Qi too deeply
myself, but it did seem like there's plenty of documentation available.
 "Scary and interesting" is a pretty apt description, especially when
the author gives an example of creating a type such as "prime integer"!