Email list hosting service & mailing list manager

Common Lisp solved this problem 20 years ago Alan Watson (25 Oct 2005 11:02 UTC)
Re: Common Lisp solved this problem 20 years ago Marcin 'Qrczak' Kowalczyk (25 Oct 2005 19:11 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (25 Oct 2005 19:22 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (25 Oct 2005 20:11 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (25 Oct 2005 20:12 UTC)
Re: Common Lisp solved this problem 20 years ago Marcin 'Qrczak' Kowalczyk (25 Oct 2005 22:08 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (25 Oct 2005 20:28 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (25 Oct 2005 20:22 UTC)
Re: Common Lisp solved this problem 20 years ago Aubrey Jaffer (25 Oct 2005 21:54 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (25 Oct 2005 22:23 UTC)
Re: Common Lisp solved this problem 20 years ago Aubrey Jaffer (26 Oct 2005 02:25 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (26 Oct 2005 03:52 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (26 Oct 2005 05:46 UTC)
Re: Common Lisp solved this problem 20 years ago Taylor Campbell (26 Oct 2005 20:05 UTC)
Re: Common Lisp solved this problem 20 years ago John.Cowan (26 Oct 2005 20:12 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (26 Oct 2005 20:38 UTC)
Re: Common Lisp solved this problem 20 years ago Thomas Bushnell BSG (26 Oct 2005 21:53 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (26 Oct 2005 22:13 UTC)
Re: Common Lisp solved this problem 20 years ago Thomas Bushnell BSG (26 Oct 2005 22:20 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (26 Oct 2005 23:31 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (27 Oct 2005 00:20 UTC)
Re: Common Lisp solved this problem 20 years ago Thomas Bushnell BSG (27 Oct 2005 03:20 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (27 Oct 2005 05:52 UTC)
Re: Common Lisp solved this problem 20 years ago Taylor Campbell (26 Oct 2005 23:51 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (27 Oct 2005 00:14 UTC)
Re: Common Lisp solved this problem 20 years ago Thomas Bushnell BSG (27 Oct 2005 03:21 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (27 Oct 2005 05:41 UTC)
Re: Common Lisp solved this problem 20 years ago Thomas Bushnell BSG (26 Oct 2005 21:52 UTC)
Re: Common Lisp solved this problem 20 years ago John.Cowan (26 Oct 2005 22:14 UTC)
Re: Common Lisp solved this problem 20 years ago Thomas Bushnell BSG (26 Oct 2005 22:17 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (26 Oct 2005 06:15 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (26 Oct 2005 06:51 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (26 Oct 2005 07:15 UTC)
Re: Common Lisp solved this problem 20 years ago Per Bothner (26 Oct 2005 07:38 UTC)
Re: Common Lisp solved this problem 20 years ago Alan Watson (26 Oct 2005 07:49 UTC)
Re: Common Lisp solved this problem 20 years ago Marcin 'Qrczak' Kowalczyk (26 Oct 2005 09:09 UTC)

Re: Common Lisp solved this problem 20 years ago Per Bothner 26 Oct 2005 22:13 UTC

Thomas Bushnell BSG wrote:
> Per Bothner <xxxxxx@bothner.com> writes:
>
>
>>Taylor Campbell wrote:
>>
>>>I'm a bit unclear on one part of your proposal: is the type
>>>declaration syntax merely a suggestion to the compiler, or does it
>>>actually affect the semantics of a program?
>>
>>The latter, but perhaps not quite the way you're thinking.
>>(let ((V :: TYPE init)) ...)
>>has semantics like:
>>(let ((V (coerce-to-TYPE init))) ...)
>
> I dislike this, because it's a hidden semantic in the type
> declaration.

Huh?  What's hidden about it?  That's the *primary* semantics
of a non-hidden syntax.

> Why not declare that (let ((V :: TYPE init)) ...) is an error if the
> init doesn't return something of the proper type?

It does that, if the value isn't convertible.

But if you go along with the basic model that modular arithmetic is
selected based on the type of the operands, then we need a way
to convert a normal integer to a modular integer, and back again.
The coercion model provides that in a convenient way.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/