Re: More static type fun.
From: Erann Gat (gat_at_jpl.nasa.gov)
Date: 10/29/03
- Next message: John Thingstad: "Re: Python from Wise Guy's Viewpoint"
- Previous message: Kaz Kylheku: "Re: Some Macro Questions."
- In reply to: Marcin 'Qrczak' Kowalczyk: "Re: More static type fun."
- Next in thread: Marcin 'Qrczak' Kowalczyk: "Re: More static type fun."
- Reply: Marcin 'Qrczak' Kowalczyk: "Re: More static type fun."
- Reply: Joachim Durchholz: "Re: More static type fun."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Oct 2003 10:49:45 -0800
In article <pan.2003.10.29.07.39.23.886122@knm.org.pl>, Marcin 'Qrczak'
Kowalczyk <qrczak@knm.org.pl> wrote:
> 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.
My ignorance is showing here -- I presume then that ML and Haskell have
the semantics that all functions take only one argument, and that calling
a function with more than one argument passes a tuple, is that right?
In that case, yes, a single stub would work. That diminishes the
magnitude of my objection from being a major problem to a minor
annoyance. But we should probably put this branch of the discussion on
hold until I have a chance to go learn ML and/or Haskell so that I
actually know what I'm talking about. Which one should I start with (or
is there something else I should look at first)?
E.
- Next message: John Thingstad: "Re: Python from Wise Guy's Viewpoint"
- Previous message: Kaz Kylheku: "Re: Some Macro Questions."
- In reply to: Marcin 'Qrczak' Kowalczyk: "Re: More static type fun."
- Next in thread: Marcin 'Qrczak' Kowalczyk: "Re: More static type fun."
- Reply: Marcin 'Qrczak' Kowalczyk: "Re: More static type fun."
- Reply: Joachim Durchholz: "Re: More static type fun."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|