Re: More static type fun.
From: Marcin 'Qrczak' Kowalczyk (qrczak_at_knm.org.pl)
Date: 10/29/03
- Next message: Fergus Henderson: "Re: Test cases and static typing"
- Previous message: Dirk Thierbach: "Re: Python from Wise Guy's Viewpoint"
- In reply to: Erann Gat: "Re: More static type fun."
- Next in thread: Jesse Tov: "Re: More static type fun."
- Reply: Jesse Tov: "Re: More static type fun."
- Reply: Erann Gat: "Re: More static type fun."
- Reply: Jacques Garrigue: "Re: More static type fun."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Oct 2003 08:39:24 +0100
On Tue, 28 Oct 2003 19:29:03 -0800, Erann Gat wrote:
> 1. The objective is to be able to write the actual call in the caller
> code, otherwise there's no point. One might as well write "error"
> directly. Writing "stub" buys you nothing.
The call is written in the caller. Stub replaces the body of the
definition of the function which doesn't exist, not its call. The function
can even be given the correct type before it's implemented.
> 2. Having all the unimplemented calls go to the same function wouldn't
> type-check.
It would. There was an error in the previous post though.
stub :: a -- Means: any type (not only functions, you can stub any object)
stub = error "Not implemented yet"
In ML you can stub only functions this way, but all functions using one stub.
--
__("< Marcin Kowalczyk
\__/ qrczak@knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
- Next message: Fergus Henderson: "Re: Test cases and static typing"
- Previous message: Dirk Thierbach: "Re: Python from Wise Guy's Viewpoint"
- In reply to: Erann Gat: "Re: More static type fun."
- Next in thread: Jesse Tov: "Re: More static type fun."
- Reply: Jesse Tov: "Re: More static type fun."
- Reply: Erann Gat: "Re: More static type fun."
- Reply: Jacques Garrigue: "Re: More static type fun."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|