Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2010-01-13 Thread Martin Coxall
>> > > Anonymous classes in Java close over their lexical environment (can > refer to variables in that lexical environment, with values bound at > the time of instance construction) with the caveat that only local > variables/parameters marked as 'final' may be referred to. Aside from > the hor

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2010-01-13 Thread Robert Greayer
On Wed, Jan 13, 2010 at 4:56 AM, Martin Coxall wrote: > > On 13 Jan 2010, at 09:51, Peter Verswyvelen wrote: > > On Sun, Nov 1, 2009 at 2:57 AM, Gregory Collins > wrote: >> >> Doing OO-style programming in Haskell is difficult and unnatural, it's >> true (although technically speaking it is possi

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2010-01-13 Thread Gregory Collins
Peter Verswyvelen writes: > On Sun, Nov 1, 2009 at 2:57 AM, Gregory Collins > wrote: > > Doing OO-style programming in Haskell is difficult and unnatural, > it's true (although technically speaking it is possible). That > said, nobody's yet to present a convincing argument to me why

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2010-01-13 Thread Peter Verswyvelen
argument. > > > From: haskell-cafe-boun...@haskell.org > [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Peter Verswyvelen > Sent: 13 January 2010 09:52 > To: Gregory Collins > Cc: haskell-cafe@haskell.org > Subject: Re: [Haskell-cafe] How to fulfi

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2010-01-13 Thread Sebastian Fischer
On Jan 13, 2010, at 11:00 AM, Sittampalam, Ganesh wrote: Type classes allow you to dispatch based on return type, and on the instantiations of generic parameters. Neither of these things is reasonably possible with interfaces. There is recent work that generalises the capabilities of inter

RE: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2010-01-13 Thread Sittampalam, Ganesh
llins Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP? On Sun, Nov 1, 2009 at 2:57 AM, Gregory Collins wrote: Doing OO-style programming in Haskell is difficult and unnatural, it's true (although technically

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2010-01-13 Thread Martin Coxall
On 13 Jan 2010, at 09:51, Peter Verswyvelen wrote: > On Sun, Nov 1, 2009 at 2:57 AM, Gregory Collins > wrote: > Doing OO-style programming in Haskell is difficult and unnatural, it's > true (although technically speaking it is possible). That said, nobody's > yet to present a convincing argumen

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2010-01-13 Thread Peter Verswyvelen
On Sun, Nov 1, 2009 at 2:57 AM, Gregory Collins wrote: > Doing OO-style programming in Haskell is difficult and unnatural, it's > true (although technically speaking it is possible). That said, nobody's > yet to present a convincing argument to me why Java gets a free pass for > lacking closures a

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-11-01 Thread Shelby Moore
Magicloud wrote: > I am not saying that the code has to be in OO style. When I say OO is > general, I mean I am thinking in OO style. This reflects on modeling, > program structure, even code organization. > Style is how we present things. I think that is less important than > how we think about th

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-11-01 Thread Magicloud Magiclouds
I am not saying that the code has to be in OO style. When I say OO is general, I mean I am thinking in OO style. This reflects on modeling, program structure, even code organization. Style is how we present things. I think that is less important than how we think about things. On Sun, Nov 1, 2009

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-31 Thread Sebastian Sylvan
On Sun, Nov 1, 2009 at 2:00 AM, Michael Vanier wrote: > Gregory Collins wrote: > >> Tom Davie writes: >> >> >> >>> On 10/31/09, Magicloud Magiclouds >>> wrote: >>> >>> After all, I never think OO as an oppsite way to all other things. The idea is so general that if you say I cannot us

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-31 Thread Michael Vanier
Gregory Collins wrote: Tom Davie writes: On 10/31/09, Magicloud Magiclouds wrote: After all, I never think OO as an oppsite way to all other things. The idea is so general that if you say I cannot use it in Haskell at all, that would make me feel weird. The only difference between la

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-31 Thread Gregory Collins
Tom Davie writes: > On 10/31/09, Magicloud Magiclouds wrote: >> After all, I never think OO as an oppsite way to all other things. The >> idea is so general that if you say I cannot use it in Haskell at all, >> that would make me feel weird. The only difference between languages >> is, some are

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-31 Thread Eugene Kirpichov
Yoda Master tells understands he you not, inheritance naked can be how, you clarify please asks he to. 2009/10/31 Magicloud Magiclouds : > Somehow, I agree with you. > I think inherit is not evil, the people use it wrong is. The problem > here is, inherit is naked right now. So people could use it

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-31 Thread Tom Davie
On 10/31/09, Magicloud Magiclouds wrote: > After all, I never think OO as an oppsite way to all other things. The > idea is so general that if you say I cannot use it in Haskell at all, > that would make me feel weird. The only difference between languages > is, some are easy to be in OO style, so

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-31 Thread Magicloud Magiclouds
After all, I never think OO as an oppsite way to all other things. The idea is so general that if you say I cannot use it in Haskell at all, that would make me feel weird. The only difference between languages is, some are easy to be in OO style, some are not. 2009/10/31 Andrew Coppin : > Rogan Cr

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-31 Thread Magicloud Magiclouds
Somehow, I agree with you. I think inherit is not evil, the people use it wrong is. The problem here is, inherit is naked right now. So people could use it wrong. On Fri, Oct 30, 2009 at 7:42 PM, Yaakov Nemoy wrote: > 2009/10/30 Peter Verswyvelen : >> The following is purely my own experience, I

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-30 Thread Andrew Coppin
Rogan Creswick wrote: > On Thu, Oct 29, 2009 at 6:54 PM, Magicloud Magiclouds > wrote: > >> My concern here is about the data member inheriting. In OOP, when I >> inherit a class, I also got the members of it. But in haskell, how to >> inherit a "data"? >> > > In my experience (almost ent

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-30 Thread Yaakov Nemoy
2009/10/30 Peter Verswyvelen : > The following is purely my own experience, I have no links to papers > of clever people :) > > I think none of the inheritance techniques work perfectly. E.g. > describing everything with OO interfaces (=a extensible record of > function pointers) is also problemati

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-30 Thread Peter Verswyvelen
The following is purely my own experience, I have no links to papers of clever people :) I think none of the inheritance techniques work perfectly. E.g. describing everything with OO interfaces (=a extensible record of function pointers) is also problematic IMHO, at least when you have side effect

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-30 Thread Colin Paul Adams
> "Magnus" == Magnus Therning writes: Magnus> It seems I was wrong in my assumption about "data Magnus> inheritance", "implementation inheritance" is just as Magnus> evil. Both are fine. -- Colin Adams Preston Lancashire ___ Haskell-Ca

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-30 Thread Magnus Therning
On Fri, Oct 30, 2009 at 7:46 AM, Martijn van Steenbergen wrote: > Magnus Therning wrote: >> >> IIRC James Gosling once said that if he were to design Java today he would >> leave out classes.  I suppose partly due to many of the issues with "data >> inheritance". > > This sounds interesting. Can y

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-30 Thread Deniz Dogan
2009/10/30 Martijn van Steenbergen : > Magnus Therning wrote: >> >> IIRC James Gosling once said that if he were to design Java today he would >> leave out classes.  I suppose partly due to many of the issues with "data >> inheritance". > > This sounds interesting. Can you link us to an article, pl

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-30 Thread Magicloud Magiclouds
On this subject, I think, any "content inherit" would lead to trouble somehow. But is that the reason that we should totally cut them loose? I mean the way of programming developing is easier making (writing), easier maintaining. In fact, I think this is a fork in front of me: Before any new though

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-30 Thread Martijn van Steenbergen
Magnus Therning wrote: IIRC James Gosling once said that if he were to design Java today he would leave out classes. I suppose partly due to many of the issues with "data inheritance". This sounds interesting. Can you link us to an article, please? Thanks, Martijn. _

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-30 Thread Magnus Therning
On 30/10/09 05:32, Rogan Creswick wrote: On Thu, Oct 29, 2009 at 6:54 PM, Magicloud Magiclouds wrote: My concern here is about the data member inheriting. In OOP, when I inherit a class, I also got the members of it. But in haskell, how to inherit a "data"? [..] The point of that whole r

Re: [Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-29 Thread Rogan Creswick
On Thu, Oct 29, 2009 at 6:54 PM, Magicloud Magiclouds wrote: > My concern here is about the data member inheriting. In OOP, when I > inherit a class, I also got the members of it. But in haskell, how to > inherit a "data"? In my experience (almost entirely with Java), it is usually a bad idea to

[Haskell-cafe] How to fulfill the "code-reuse" destiny of OOP?

2009-10-29 Thread Magicloud Magiclouds
Hi, I think when people talk about OOP, especially the inheriting, their focus mainly is on functions (methods). My concern here is about the data member inheriting. In OOP, when I inherit a class, I also got the members of it. But in haskell, how to inherit a "data"? -- 竹密岂妨流水过 山高哪阻野云飞 __