Re[2]: [Haskell] Dynamic binding

2005-06-23 Thread Bulat Ziganshin
Hello Andrew, Thursday, June 23, 2005, 5:38:03 AM, you wrote: AW> To handle the problem of drawing all shapes, in c++, I would have a list AW> of shape pointers: AW> struct shape{ virtual void draw(...);}; AW> struct circle : public shape {...}; AW> struct square : public shape {...}; AW> std::l

RE: Re[2]: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Bulat, Bulat wrote: > just create list of draw functions itself: > > [drawCircle (10,10) 5, drawSquare (20,20) 10] No! the exercise is about lists of shapes not lists of results of drawing shapes. This is clearly a major difference. Bulat wrote: > for more complex tasks - declare interface a

Re: Re[2]: [Haskell] Dynamic binding

2005-06-23 Thread ajb
G'day all. Thursday, June 23, 2005, 5:38:03 AM, you wrote: > To handle the problem of drawing all shapes, in c++, I would have a list > of shape pointers: > struct shape{ virtual void draw(...);}; > struct circle : public shape {...}; > struct square : public shape {...}; > std::list shapes; > f

RE: Re[2]: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Andrew, you are circumventing the hard problem! (Even though I am sure you just forgot to mention it.) That is, the question is about drawing a *list* of shapes. As correctly observed by Rathman ages back, one naturally ends up with existential quantification when simulating dynamic binding. Ex

Re: [Haskell] Dynamic binding

2005-06-23 Thread Andreas Rossberg
Andrew Ward wrote: In Simon Thompson's The Craft of Functional Programming Second Edition, page 226, it is mentioned that Laufer (1996) describes a Haskell extension to allow dynamic binding. I was wondering if this has been implemented as an extension in any of the haskell compilers, or varian

[Haskell] rfc: package mounting

2005-06-23 Thread Frederik Eaton
Hi all, It looks like there's been a bit of recent discussion regarding module and package namespaces. There is a certain possible design feature that I don't think has been mentioned yet, that I think would be very helpful, so I thought I should at least bring it up. What I want is to be able to

RE: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Andreas Rossberg: Andreas R. wrote: > "dynamic binding" is just the OOO way of saying > "calling a first-class function"). Let me presume that dynamic binding was meant here in the sense of late binding, in the sense of subtyping polymorphism. At least, the given shapes example strongly suggest

Re: [Haskell] Dynamic binding

2005-06-23 Thread Jan-Willem Maessen
On Jun 22, 2005, at 9:38 PM, Andrew Ward wrote: Pal-Kristian Engstad wrote: On Wednesday 22 June 2005 05:38 pm, Andrew Ward wrote: What would be the normal way for a Haskell programmer to handle the typical shape example in beginner OO tutorials? By not doing OO. You have to ask yourself, w

Re: [Haskell] Dynamic binding

2005-06-23 Thread Andreas Rossberg
Ralf Lammel wrote: "dynamic binding" is just the OOO way of saying "calling a first-class function"). Let me presume that dynamic binding was meant here in the sense of late binding Yes. in the sense of subtyping polymorphism. No, as far as I read it, "dynamic" or "late binding" is ort

Re: [Haskell] Dynamic binding

2005-06-23 Thread Lennart Augustsson
Andrew Ward wrote: Hi All, In Simon Thompson's The Craft of Functional Programming Second Edition, page 226, it is mentioned that Laufer (1996) describes a Haskell extension to allow dynamic binding. I was wondering if this has been implemented as an extension in any of the haskell compilers,

RE: [Haskell] Dynamic binding

2005-06-23 Thread Ralf Lammel
Lennart, from a textbook perspective I agree that this solution should be mentioned to make it easy for non-Haskellers to get into the subject. However (as you of course know, but I just don't understand why you don't dare to mention the limitations a) and b) ...) a) Your constructor-based appr

Re: [Haskell] rfc: package mounting

2005-06-23 Thread Stefan Karrmann
My two cents: In Coq, cf. chapter 2.5.1 (Names of libraries and files), there is something similar: Add LoadPath "physical_path" as . E.g.: Add LoadPath "/home/sk/lib/foo" as Foo. Frederik Eaton (Thu, Jun 23, 2005 at 02:14:00AM -0700): > Hi all, >

Re: [Haskell] Dynamic binding

2005-06-23 Thread Lennart Augustsson
Yes, a) is a weakness, but usually I don't find it too restrictive. I agree that extensible data types would be a very interesting addition to Haskell, and I'd like to have it. But the original question was how to do it in Haskell, and when I hear Haskell i think Haskell-98 since it's the only st

[Haskell] 7th GPCE Young Researchers Workshop Deadline: June 30, 2005

2005-06-23 Thread GPCE YRW Organizers
[apologies for multiple copies] 7th GPCE Young Researchers Workshop 2005 In conjunction with

[Haskell] FACS'05: Second Call for Papers

2005-06-23 Thread Luis Barbosa
[apologies for cross-posting] - SECOND CALL FOR PAPERS FACS'05 II International Workshop on Formal Aspects of Component Software Macao October 24-25, 2005 www.iist.unu.edu/facs0

[Haskell] SOS 2005: Programme

2005-06-23 Thread iu3
CALL FOR PARTICIPATION: Structural Operational Semantics 2005 A Satellite Workshop of ICALP 2005 July 10, 2005, Lisbon, Portugal http://www.cs.le.ac.uk/events/SOS2005 PROGRAMME: http://www.cs.le.ac.uk/events/SOS2005/Programme.html INVITED SPEAKERS:

Re: [Haskell] Dynamic binding

2005-06-23 Thread Pal-Kristian Engstad
On Wednesday 22 June 2005 06:38 pm, Andrew Ward wrote: % This general pattern of dynamic binding I use over and over again. Could % you give me some example code of this type of thing handled in Haskell's % way? Assuming that the number of classes deriving from shape might get % quite large. What