Re: [Haskell-cafe] Things to avoid (Was: Top 20 ``things'' to know in Haskell)

2005-02-10 Thread Thomas Jäger
Is there also a Wiki page about things you should avoid? Since I couldn't find one, I started one on my own: http://www.haskell.org/hawiki/ThingsToAvoid I consider 'length', guards and proper recursion anchors. [Moving the discussion from the wiki to the mailing list until we've

Re: [Haskell-cafe] Things to avoid (Was: Top 20 ``things'' to know in Haskell)

2005-02-10 Thread Remi Turk
On Wed, Feb 09, 2005 at 02:54:12PM +0100, Henning Thielemann wrote: On Wed, 9 Feb 2005, Henning Thielemann wrote: Is there also a Wiki page about things you should avoid? Since I couldn't find one, I started one on my own: http://www.haskell.org/hawiki/ThingsToAvoid I consider

Re: [Haskell-cafe] Things to avoid (Was: Top 20 ``things'' to know in Haskell)

2005-02-10 Thread Henning Thielemann
On Thu, 10 Feb 2005, [ISO-8859-1] Thomas Jäger wrote: Altogether, the spirit of the page seems to be use as little syntactic sugar as possible which maybe appropriate if it is aimed at newbies, who often overuse syntactic sugar (do-notation). This overuse is what I observed and what I like

Re: [Haskell-cafe] Things to avoid (Was: Top 20 ``things'' to know in Haskell)

2005-02-10 Thread Henning Thielemann
On Thu, 10 Feb 2005, [ISO-8859-1] Thomas Jäger wrote: Altogether, the spirit of the page seems to be use as little syntactic sugar as possible which maybe appropriate if it is aimed at newbies, who often overuse syntactic sugar (do-notation). What I forgot: Each new syntactic sugar is

Re: [Haskell-cafe] Things to avoid (Was: Top 20 ``things'' to know in Haskell)

2005-02-10 Thread Thomas Jäger
On Thu, 10 Feb 2005 12:50:16 +0100 (MET), Henning Thielemann [EMAIL PROTECTED] wrote: On Thu, 10 Feb 2005, [ISO-8859-1] Thomas Jäger wrote: Altogether, the spirit of the page seems to be use as little syntactic sugar as possible which maybe appropriate if it is aimed at newbies, who

[Haskell-cafe] Point-free style (Was: Things to avoid)

2005-02-10 Thread Jan-Willem Maessen
On Feb 10, 2005, at 6:50 AM, Henning Thielemann wrote: On Thu, 10 Feb 2005, [ISO-8859-1] Thomas Jäger wrote: Altogether, the spirit of the page seems to be use as little syntactic sugar as possible which maybe appropriate if it is aimed at newbies, who often overuse syntactic sugar (do-notation).

Re: [Haskell-cafe] Top 20 ``things'' to know in Haskell

2005-02-10 Thread Graham Klyne
It's not exactly what you ask for, but I wrote down some of the things I learned in my early days with Haskell: http://www.ninebynine.org/Software/Learning-Haskell-Notes.html #g -- At 10:31 07/02/05 -0500, Jacques Carette wrote: The recent post of Graham Klyne (below) reminds me that I have

[Haskell-cafe] Re: Point-free style

2005-02-10 Thread Peter Simons
Jan-Willem Maessen writes: Is it really clear or obvious what map . (+) means? Yes, it is perfectly obvious once you write it like this: incrEach :: Integer - [Integer] - [Integer] incrEach = map . (+) Now compare that to the following function, which does the some thing but

Re: [Haskell-cafe] Re: Point-free style

2005-02-10 Thread Daniel Fischer
Am Donnerstag, 10. Februar 2005 16:53 schrieb Peter Simons: Jan-Willem Maessen writes: Is it really clear or obvious what map . (+) means? Yes, it is perfectly obvious once you write it like this: incrEach :: Integer - [Integer] - [Integer] incrEach = map . (+) Yes,

[Haskell-cafe] Getting an attribute of an object

2005-02-10 Thread Dmitri Pissarenko
Hello! I have a list of instances of the ClassifiedImage class, which is defined as follows. data ClassifiedImage = ClassifiedImage {imageFileName :: String, subjectID :: String} deriving Show Attribute imageFileName contains a file name of a certain image. I want to transform the list

Re: [Haskell-cafe] Getting an attribute of an object

2005-02-10 Thread Dmitri Pissarenko
Can I use map for readImage function, which is in the IO domain? If not, what tutorial can help me? Sorry, by IO domain I mean IO monad. Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: Point-free style

2005-02-10 Thread Henning Thielemann
On 10 Feb 2005, Peter Simons wrote: Now compare that to the following function, which does the some thing but without point-free notation: incrEach' :: Integer - [Integer] - [Integer] incrEach' i is = is = \i' - return (i'+i) point-free again is = return . (i+) :-]

Re: [Haskell-cafe] Getting an attribute of an object

2005-02-10 Thread Jules Bean
On 10 Feb 2005, at 20:17, Dmitri Pissarenko wrote: Hello! I have a list of instances of the ClassifiedImage class, which is defined as follows. data ClassifiedImage = ClassifiedImage {imageFileName :: String, subjectID :: String} deriving Show Attribute imageFileName contains a file

Re: [Haskell-cafe] Getting an attribute of an object

2005-02-10 Thread Tomasz Zielonka
On Thu, Feb 10, 2005 at 09:17:17PM +0100, Dmitri Pissarenko wrote: Hello! Hello! I have a list of instances of the ClassifiedImage class, which is defined as follows. data ClassifiedImage = ClassifiedImage {imageFileName :: String, subjectID :: String} deriving Show

Re: [Haskell-cafe] Things to avoid (Was: Top 20 ``things'' to know in Haskell)

2005-02-10 Thread Remi Turk
On Wed, Feb 09, 2005 at 02:54:12PM +0100, Henning Thielemann wrote: On Wed, 9 Feb 2005, Henning Thielemann wrote: Is there also a Wiki page about things you should avoid? Since I couldn't find one, I started one on my own: http://www.haskell.org/hawiki/ThingsToAvoid I consider

Re: [Haskell-cafe] Things to avoid (Was: Top 20 ``things'' to know in Haskell)

2005-02-10 Thread Iavor Diatchki
Hello, ... Yeah, as long as it is explained and clearly marked as an opinion (as it is now), that's ok. One reason that I got so excited about that is because I don't like the current situation with (n+k)-patterns: Everybody says they're evil, but hardly anybody can explain why he thinks

Re: [Haskell-cafe] Re: Point-free style

2005-02-10 Thread Matthew Roberts
just a few quick observations comming from an imperative background, I found point free code very difficult to understand when learning Haskell. It is not that it is hard to understand the concepts of point-free style, it is that it is hard to know when something is point-free. It is another

Re: [Haskell-cafe] Point-free style (Was: Things to avoid)

2005-02-10 Thread Matthew Roberts
I have to agree (although I suspect few others will :)) matt On 11/02/2005, at 1:23 AM, Jan-Willem Maessen wrote: On Feb 10, 2005, at 6:50 AM, Henning Thielemann wrote: On Thu, 10 Feb 2005, [ISO-8859-1] Thomas Jäger wrote: Altogether, the spirit of the page seems to be use as little syntactic

[Haskell-cafe] Re: Point-free style (Was: Things to avoid)

2005-02-10 Thread oleg
Jan-Willem Maessen wrote: ] Is it really clear or obvious what ] ] map . (+) ] ] means? Perhaps the following two examples might be more convincing: u=uncurry e=((partition $ u(==)).) . zip f x=(x\\).(x\\) It is obviously clear what 'e' and 'f x' do. The second example, which even

Re: [Haskell-cafe] Re: Point-free style (Was: Things to avoid)

2005-02-10 Thread Sebastian Sylvan
On Thu, 10 Feb 2005 18:04:26 -0800 (PST), [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Jan-Willem Maessen wrote: ] Is it really clear or obvious what ] ] map . (+) ] ] means? Perhaps the following two examples might be more convincing: u=uncurry e=((partition $ u(==)).) . zip f

Re: [Haskell-cafe] Re: Point-free style (Was: Things to avoid)

2005-02-10 Thread David Menendez
Sebastian Sylvan writes: Points free style is cool in a geeky sort of way, but not really all that useful when you're trying to write clear code that people can actually understand. That's true of badly-written point-free code, certainly. However, anyone who has spent time doing shell