Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-09 Thread ok
On 10 Aug 2007, at 6:42 am, David Roundy wrote: do x1 <- e1 if x1 then do x2 <- e2 xx <- if x2 then e3 else do x4 <- e4 x5 <- e5 e6 x4 x5 e7 xx x1 e

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-09 Thread Brandon Michael Moore
On Thu, Aug 09, 2007 at 11:52:17AM -0700, David Roundy wrote: > On Thu, Aug 09, 2007 at 02:08:20PM +0100, Jules Bean wrote: *snip* > > A third example is with nested dos: > > > > do x <- bar y > >baz > >something $ do foo x > > > > is not the same as > > > > do baz > >something $

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-09 Thread David Roundy
On Thu, Aug 09, 2007 at 02:08:20PM +0100, Jules Bean wrote: > David Roundy wrote: > >On Wed, Aug 08, 2007 at 02:20:39PM -0400, Paul Hudak wrote: > >As long as the sugar has a pretty obvious desugaring (which I seem to > >recall it did), I don't see how it's likely to make things worse. And > > So

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-09 Thread David Roundy
On Thu, Aug 09, 2007 at 04:02:05PM +1200, ok wrote: > On 9 Aug 2007, at 8:41 am, David Roundy wrote: > >I may be stating the obvious here, but I strongly prefer the do syntax. > >It's nice to know the other also, but the combination of do +indenting > >makes complicated code much clearer than the n

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-09 Thread David Pollak
For what it's worth from a Haskell newbie (and from someone who's been doing FP since November, mainly in Scala.) I really like Haskell's purity and having the clear separation between zero side effects and monads is most excellent. It was quite a brain change to program functionally. It took a

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-09 Thread Jules Bean
David Roundy wrote: On Wed, Aug 08, 2007 at 02:20:39PM -0400, Paul Hudak wrote: As long as the sugar has a pretty obvious desugaring (which I seem to recall it did), I don't see how it's likely to make things worse. And Some people are arguing that the desugaring isn't obvious. Although I lik

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Bulat Ziganshin
Hello Paul, Wednesday, August 8, 2007, 10:20:39 PM, you wrote: > we need).  On the other hand, if we give imperative programmers the > tools to do all the things they are used to doing in C++, then we > will be depriving them of the joys of programming in the Functional > Way.  How many times hav

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Hugh Perkins
On 8/9/07, ok <[EMAIL PROTECTED]> wrote: > > We get extra >>, >>=, \, ->, and "in" tokens, but no new parentheses. > Yes exactly. It's the >>= and >> that gets rid of the parentheses, and reverses the order of the operations. I cant remember where I saw this, but somewhere there is a monad tutor

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread ok
On 9 Aug 2007, at 8:41 am, David Roundy wrote: I may be stating the obvious here, but I strongly prefer the do syntax. It's nice to know the other also, but the combination of do +indenting makes complicated code much clearer than the nested parentheses that would be required with purely >>=

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Donald Bruce Stewart
bf3: > >IMHO and being a newbie having 20 years of professional >C/C++/C# experience but hardly any Haskell experience, I >agree with this... I find the monad syntax very confusing, >because it looks so much like imperative code, but it isn't. >Personally I also liked the Concu

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Michael Vanier
I can't agree with your point about Haskell being (just) a prototype language (assuming that's what you meant). If that's the case, it won't last very long. Languages need to be something you can write real, practical applications in. Fortunately, Haskell isn't just a prototype language. I'm

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Brian Hulley
Paul Hudak wrote: All of the recent talk of support for imperative programming in Haskell makes me really nervous ... if we give imperative programmers the tools to do all the things they are used to doing in C++, then we will be depriving them of the joys of programming in the Functional

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread David Roundy
On Wed, Aug 08, 2007 at 02:20:39PM -0400, Paul Hudak wrote: > All of the recent talk of support for imperative programming in Haskell > makes me really nervous. To be honest, I've always been a bit > uncomfortable even with monad syntax. Instead of: > > do x <- cmd1 > y <- cmd2 > ... >

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Hugh Perkins
On 8/9/07, peterv <[EMAIL PROTECTED]> wrote: > > IMHO and being a newbie having 20 years of professional C/C++/C# > experience but hardly any Haskell experience, I agree with this… I find the > monad syntax very confusing, because it looks so much like imperative code, > but it isn't. Personally I

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Donn Cave
On Wed, 8 Aug 2007, Paul Hudak wrote: ... > Well, you could argue, monad syntax is what really made Haskell become > more accepted by the masses, and you may be right (although perhaps > Simon's extraordinary performance at OSCOM is more of what we need). On > the other hand, if we give imperat

Re: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Gene A
On 8/8/07, Philippa Cowderoy <[EMAIL PROTECTED]> wrote: > > On Wed, 8 Aug 2007, peterv wrote: > {... > An editor that can be configured to display various inferred details, > annotations and desugarings in the middle of the source would be useful > for all kinds of purposes, and certainly not just

RE: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Philippa Cowderoy
On Wed, 8 Aug 2007, peterv wrote: > PS: It would be very nice for beginners to have a special tool / text editor > that allows you see the desugared form of monads and other constructs. > An editor that can be configured to display various inferred details, annotations and desugarings in the mi

RE: [Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread peterv
m of monads and other constructs. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Hudak Sent: Wednesday, August 08, 2007 8:21 PM To: haskell-cafe@haskell.org Cc: [EMAIL PROTECTED] Subject: [Haskell-cafe] a regressive view of support for imperative programming in Haskell All

[Haskell-cafe] a regressive view of support for imperative programming in Haskell

2007-08-08 Thread Paul Hudak
All of the recent talk of support for imperative programming in Haskell makes me really nervous. To be honest, I've always been a bit uncomfortable even with monad syntax. Instead of: do x <- cmd1 y <- cmd2 ... return e I was always perfectly happy with: cmd1 >>= \x-> cmd2 >>= \