[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [Qi] Fwd: book deal goes through with printer
|
- From: "Jonathan Tran" <jonnytran@gmail.com>
- To: philly-lambda@googlegroups.com
- Subject: Re: [Qi] Fwd: book deal goes through with printer
- Date: Fri, 19 Sep 2008 11:33:21 -0400
- Authentication-results: mx.google.com; spf=neutral (google.com: 172.21.14.6 is neither permitted nor denied by domain of jonnytran@gmail.com) smtp.mail=jonnytran@gmail.com; dkim=pass (test mode) header.i=@gmail.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :dkim-signature:domainkey-signature:received:received:message-id :date:from:to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references:reply-to :sender:precedence:x-google-loop:mailing-list:list-id:list-post :list-help:list-unsubscribe:x-beenthere-env:x-beenthere; bh=xK882HNoUo91Raw4zltWGsMAFJwfGUfy34f0suOZdJ0=; b=FAql6F1GNBji7YDcnpjuOtnxE3MIhprFCaxYx/nrOPzr1fCsD7fg4INNeCHJWgJbcE QAYTMfldGaDj4eV61FSt/4B+YbVo9kIploRYvbPl/ryi+oo5iegv1iQZzTmsoXY8FMi1 gKUeoz/iTCi6d/Cbtjher0dxt6NKW+KdrbTMo=
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=VAZVXNbHjwl/qxMIp+9cczD8w05DO/a2bYI4zm+pHWs=; b=nMgFGU4JCkkmZa58qMnC4mCvlgDEPAxsvqc4Ceuyop3KotXMAOipzULWHvSJdnDT3U gFNHAPjPhmkb/VHuVKrs0who/VIT50grNri6I1sDaOXgZboXeteWXUQT7obV9uR/DOYU oh4YkoFyUYmB5nvr7qTtK4ziSlspqkv8Oqrj4=
- Mailing-list: list philly-lambda@googlegroups.com; contact philly-lambda+owner@googlegroups.com
- Reply-to: philly-lambda@googlegroups.com
- Sender: philly-lambda@googlegroups.com
It doesn't exactly work like that. See the blog post if you're
interested in the details.
http://programmingkungfuqi.blogspot.com/2006/04/qi-and-magic-prime-type.html
The basic idea is that you can make your functions' return types or
parameter types be "prime". So wherever you use them, the compiler
can check that primes, like int, string, or any other type, are used
consistently.
Then you write a function (actually more like a BNF rule, but it's
essentially the same) that tells the compiler how to determine whether
a value is actually prime. This is where it may take long -- in
checking actual values. You could do this at compile time if actual
values are available, as Kyle pointed out. But you usually don't.
You usually don't have the actual values that your functions take as
params or return until you actually run the program. At this point
(runtime), Qi can optionally verify that the values are actually prime
by running your function.
On Fri, Sep 19, 2008 at 11:16 AM, Sonny To <son.c.to@gmail.com> wrote:
>
> On Fri, Sep 19, 2008 at 10:56 AM, Kyle R. Burton <kyle.burton@gmail.com> wrote:
>>
>> Don't know if any of you guys are following Qi, but the best way I can
>> paraphrase it's core concept is: Qi re-defines what 'strongly typed'
>> means for programming languages. One of the things the tutorial goes
>> through is extending the type-system by creating a Prime Number type.
>> That type then becomes part of the compile-time analysis and type
>> checking.
>>
>> Kyle
>
> what if you have a very large prime number? it would take forever to compile
>
|
|