This page is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
1What's meant by an "eager" variation? I worked with functional languages for some amount of time and never heard the term. -- Robert Merkel
Do you have a reference for this statement? -- Taw
Likewise for this unreferenced claim. —The preceding unsigned comment was added by 17.221.40.150 ( talk) 00:08, 13 April 2007 (UTC).
Is it okay to remove this blatant lie? Nobody uses haskell, and this reference hardly has any relation to "the most research is being performed" 85.140.204.113 16:01, 22 July 2007 (UTC)
"Haskell" can also refer to http://www.haskell.edu/, so I'm not moving this page to Haskell. -- Eloquence 16:55 Jan 24, 2003 (UTC)
Not sure about the new version of the Fibonacci sequence example — it's longer than the first one and harder to read IMHO (although it is clever, I admit). Any comments on this? -- Cadr
zipWith
--
CadrI got the idea: can we present both versions on the article and discuss how they work. To be honest, I don't know how the second one works and I want to know why you said it's a clever way. The readers might be fascinated by the fact Haskell is so cool. -- Taku 16:52, Apr 6, 2004 (UTC)
fib@(_:tfib) = 1 : 1 : [ (a+b) | (a,b) <- zip fib tfib ]
Should this article mention Hindley-Milner type inference and the monomorphism restriction? Or is this too detailed information to be included into a encyclopedic article? -- Tobias Bergemann 08:30, 2004 Nov 16 (UTC)
Why the deletion of the 'extensions' section on Hugs98 for .NET? I can't immediately see why it'd be problematic. (And there no rationale provided.) -- Alai 19:36, 19 Jan 2005 (UTC)
On the literate programming page, someone mentioned Haskell as a language that "makes full use of literate programming". As pointed out in the Talk page there, that is not how I remember Haskell, but I'd appreciate if someone could clarify things there. -- Ar 17:08, 2005 Feb 7 (UTC)
Not at all, as far as I know, and not according to our article on Lambda calculus. In Lambda calculus, '.' is used as a syntactic element in lambda abstractions. In Haskell (prelude), f . g = \ x -> f (g x), that is function composition like the "circle operator" in mathematical analysis. --Anon.
I decided to clean up the examples section a bit, which I have now done. The factorial function now has a proper type declaration (best to do these things right...) and a line-by-line explanation.
It's been mentioned previously about explaining the methods behind some of the more involved examples shown (particularly, why the linear-time Fib sequence is so elegant). I'm not sure we should turn Wikipedia into another Haskell tutorial, but if anyone knows places off-site which explain how they work, that would be good. Opinions, anyone?
--Ithika (not yet got account) 81.131.174.201 16:59, 4 September 2005 (UTC)
Since we already use the factorial function as an example, should we also link to "The Evolution of a Haskell Programmer", which provides 20+ increasingly elaborate implementations of this same function? -- Tobias Bergemann 08:36, 20 October 2005 (UTC)
Re the fac example, I'm an Haskell novice, but it seems to me that the guard expression in
fac :: Integer -> Integer fac 0 = 1 fac n | n > 0 = n *fac (n-1)
serves no purpose? The zero case is handled and the only other possibility is n<0 which isn't checked for anyway...could you not replace with the following?
fac :: Integer -> Integer fac 0 = 1 fac n = n *fac (n-1)
-- Jaybee 21:06, 26 April 2006
Can someone knowledgeable about Haskell please add some commentary to the "More Complex Examples" section, similar to what is there for the "Examples" section? The syntax is a bit abstruse for those not already familiar with the Haskell language. Kwertii 18:46, 20 February 2006 (UTC)
I've put in a bit about the linear-time Fibonacci sequence. It seemed that lazy evaluation and infinite lists were the relevant points to make about that bit of code. I don't really know what to say about the others though. The RPN calculator could, I'm sure, be written that way in most functional languages? Ithika 16:48, 11 March 2006 (UTC)
I now have some insight into Haskell, and also some insight into why it is not more popular.
Take a simple example such as fib:
Hugs.Base> fibs = 0 : 1 : [ a+b | a <- fibs | b <- tail fibs ] ERROR - Syntax error in input (unexpected `=') Hugs.Base>
or
Prelude> fibs = 0 : 1 : [ a+b | a <- fibs | b <- tail fibs ] <interactive>:1:5: parse error on input `=' Prelude>
If I can't get a simple 1-line example to run with copy and paste, I'm not likely to want to continue. After reading more books I discovered that
Prelude> let fibs = 0 : 1 : (zipWith (+) fibs (tail fibs))
did indeed work (the list comprehension version doesn't work without special flags).
Why do we have examples which do not work in the standard environment? -- njh 03:51, 3 January 2006 (UTC)
ghci Example.hs
, and type main
to start it. Giving the one-line hack as the first example will only mislead reader as it gives the impression that Haskell has an awkward curly-bracket style syntax, which normally does not. In this respect the interpreter might be wrong for new users but is much better suited for "real" users. For example the interpreter allows you to do more than just execute types in code, such as running the type inferencer on a specific function or browsing modules, which as far as I know th Perl interpreter won't let you. —
Ruud
20:10, 28 January 2006 (UTC)In the Examples section, there is a one-line definition for the fac function. According to Aaron McDaid, the syntax for this definition doesn't work in Hugs. It does work in Ghci. I only use Ghci and had assumed that the different interpreters used the same syntax for entering a definition in one line. If different interpreters really have different syntaxes for this, perhaps we should just get rid of the one-line example, and remove details that are specific to specific Haskell interpreters, as that would be getting rather non-encyclopedic. -- Catamorphism 20:47, 1 March 2006 (UTC)
Resetting indent. This is what I'm thinking of changing near the start of the the Haskell_programming_language#Examples section:
let { fac 0 = 1; fac n | n > 0 = n * fac (n-1) }
fac 5
let { fac 0 = 1; fac n | n > 0 = n * fac (n-1) } in fac 5
I'll wait a while before making this change. Thanks in advance for any feedback. I suppose we don't want to turn this into a full user manual for hugs and ghc(i) Aaron McDaid ( talk - contribs) 15:24, 9 September 2006 (UTC)
Is the infobox correct in asserting that there are no dialects of Haskell? Then why the difference between '98 and all the others? —The preceding unsigned comment was added by Marudubshinki ( talk • contribs) 21:48, 11 April 2006 (UTC2)
This really needs to be clarified:
As it stands suggests that the problem is that Haskell has differences from other languages and that the critic simply wants to suppress diversity. This would not be rational criticsm, because it suggests that the ideal is that only one unique language exist. The problem may have been misphrased to avoid the real criticsm, or it may have been included without there being any real merit behind it. -- ToobMug 01:37, 24 April 2006 (UTC)
Simon Peyton Jones, Paul Hudak, John Hughes, and Philip Wadler are currently working on a paper describing the history of Haskell. This paper is currently in draft state, but will be submitted to the History of Programming Languages conference (HOPL'07) once it is finished. The draft is publically available and already is a very valuable source of information. — Tobias Bergemann 09:55, 4 August 2006 (UTC)
Haskell programming language → Haskell (programming language) – Conformance with WP naming conventions LotLE× talk
I recently started an article for wxHaskell, one of the many bindings for WxWidgets. It has been nominated for deletion as it "Does not assert notability". Please have a look at it and improve it if possible, especially if you are a fan of wxHaskell. Aaron McDaid ( talk - contribs) 13:33, 11 September 2006 (UTC)
"This sentence does not make much sense: he Glasgow Haskell Compiler compiles to native code on a number of different architectures—as well as to ANSI C—using C-- as an intermediate language." --using c-- ?? 128.12.108.147 13:12, 4 March 2007 (UTC)
What's the status of Concurrent Haskell? I've found this reference:
PEYTON JONES, S., GORDON, A., AND FINNE, S. Concurrent Haskell. In 23rd ACM Symposium on Principles of Programming Languages (POPL’96), pp. 295–308.
and it's also recently described in Composable Memory Transaction, 2006.
Bartosz 01:55, 7 March 2007 (UTC)
Say in haskell I wanted to implement the types Z/mZ i.e. "integers mod m" for all integeres m>1. Naturally I'd want to implement the arithmetic operator / for these types. Context: In 1992-3 I faced this prob while writing haskell code for smith reduction for all integral domains where it makes sense. (Which in turn was part of a homological-algebra package). The best I could do was to define a single type Zmod, and replace the binary operator \a \b a/b by a ternary function \a \b \m "a/b mod m" . Which meant that even for the integer type, I had to replace (/) by that ternary function and pass it a dummy argument that it ignored.
Was I missing something then? Is there in newer haskell versions a way to define type schemas? (ie nonconstant type-valued functions of at least one argument). [I suppose not - is Type yet a Type in Haskell?] Or at least to do the stuff mentioned in the above paragraph in a less kludgy way? I guess not - types are untermenschen in haskell, subject to compulsory type checks which had better be "finite" - "infinite" type checking being "inefficient" - so e.g. you cannot write the fixedpoint operator named after Haskell Curry in the language named after Haskell Curry. (nor can you write the noniterative nonrecursive factorial program that works by passing a function as an argument to itself, 'cause that function would have "infinite" type. —The preceding unsigned comment was added by 59.93.195.26 ( talk) 03:51, 29 March 2007 (UTC).
Perhaps a pronounciation ought to be given? I suspect it's probably pronounced as the last name of "Beaver" Cleaver's buddy Eddie, but in my head it always sounds closer to Pascal (programming language). -- Belg4mit 18:37, 7 April 2007 (UTC)
Heh, whatever. These code examples are all taken from some sort of freshman Haskell course and are nothing like Haskell code looks like out there in the wild. I note my attempt to add such an example and clean up the current mess has been summarily reverted. —The preceding unsigned comment was added by 193.77.153.149 ( talk) 11:43, 11 May 2007 (UTC).
If you would like to discuss this:
jbolden1517 Talk 13:23, 11 May 2007 (UTC)
I don't really see what aspects of Python are owed in particular to Haskell. Perhaps lazy streams, but is there any evidence that it did so directly? Jogloran 13:14, 13 May 2007 (UTC)
Would you folks say that Haskell supports multiple dispatch? If so, could you update that article? I'm not too sure. It was this section of that article that piqued my curiousity:
One of the things I like about Haskell is that it supports (something like) the above. In Haskell, the first argument isn't special, and typeclasses can be used on any argument:
Aaron McDaid ( talk - contribs) 17:20, 16 December 2007 (UTC)
Single and multiple dispatch are both forms of dynamic dispatch. They come out of the object oriented world where the function (method) to be dispatched to is unknowable until runtime (hence the "dynamic"). In Haskell type classes the choice of function is made statically. As such, the terminology used by Haskellers to describe that kind of behavior is "overloading" and shares more similarities with the statically bound overloading available in languages like C++ and Java than the multiple dispatch of Common Lisp and Dylan or the dynamic single dispatch overriding of C++/Java. One major (and crucial) difference between Haskell type class overloading and C++/Java overloading is that in Haskell the choice of which overloaded function is called may depend on nothing more than the static type of the result. In C++/Java the choice of overloaded method depends on the static types of the parameters only. See the article on monads in functional programming - different unit functions must be chosen based entirely on the expected return type. —Preceding unsigned comment added by 24.94.4.15 ( talk) 14:14, 8 February 2008 (UTC)
I'm not sure that Java generics rise to the level of an influence from Haskell. True, there is the Philip Wadler connection, but IMHO Java's generics are just a form of parametric polymorphism (which pre-dates Haskell, e.g., in ML and Miranda) with the syntactic flavor of C++ templates. Clconway ( talk) 23:22, 4 January 2008 (UTC)
I downloaded GHCi from haskell.org, tried the examples on the Wikipedia page, and found most of them didn't work. This is hugely confusing. One of the examples with "let" that's recommended for Hugs worked for me, which is also confusing since I'm not running Hugs, and the page says GHCi doesn't have that restriction.
I see from the comments above that this problem has come up before. I respectfully suggest that the examples should work with the standard Haskell system. Billgordon1099 ( talk) 05:46, 7 June 2008 (UTC)
What does this mean? Regards, Ben Aveling 08:59, 7 September 2008 (UTC)
Interesting reading; see the original question and answer and related followup. Do we merge these into the article? -- Gwern (contribs) 23:18 19 September 2008 (GMT)
I am a bit nervous about the following recent addition to the lead section: "An open source product of more than twenty years of cutting edge research, it allows rapid development of robust, concise, correct software. With strong support for integration with other languages, built-in concurrency and parallelism, debuggers, profilers, rich libraries and an active community, Haskell allows for the production of flexible, maintainable high-quality software." This text was apparantly copied and pasted from http://www.haskell.org/. While I basically agree with the text, I feel that as written it does sound too much like marketing speech, and I was tempted to revert the edit. Maybe the text could be rephrased or at least supplemented with appropriate references? — Tobias Bergemann ( talk) 08:10, 21 October 2008 (UTC)
The latest addition to the article suggests that mapReduce could be simplified from 1) to 2)
1) mr takes a list, applies a function to it and then reduces the elements based on a criterion
mr criteria operator list = reduce criteria (map operator list)
which can be expressed point-free as 2)
mr = (. map) . (.) . reduce
-- Ancheta Wis ( talk) 18:15, 31 March 2009 (UTC)
Well thank you! Nice to hear you like. Yeah I got a kick out of that one when I worked it out the first time. The one that made a convert out of me was the Eight queens puzzle solutions:
queens :: Int -> Int queens n = map reverse $ queens' n where queens' 0 = [[]] queens' k = [q:qs | qs <- queens' (k-1), q <- [1..n], isSafe q qs] isSafe try qs = not (try `elem` qs || sameDiag try qs) sameDiag try qs = any (\(colDist,q) -> abs (try - q) == colDist) $ zip [1..] qs
I saw that solution and it got me to learn Haskell. Look at those C#/Java/Python solutions comparatively, talk about a mound of boilerplate. Wikipedia has haskell/FP versions all over the place, I personally think this trend is likely to start selling people on FP, at least I hope jbolden1517 Talk 02:28, 1 April 2009 (UTC)
I've removed the goal from the article because it's of little use to people who don't know Haskell (or to those that do) and it's POV too. What if I opened the article about Java and discovered (written with 'we' to show my point):
It may all be factually correct for Haskell and it should all be in the article but not by repeating the project's goals: after reading the article, the reader should be able to conclude whether this holds or not. Simeon ( talk) 15:54, 5 April 2009 (UTC)
Perhaps the goals could be re-instated with a balancing sentence, such as "For twenty years, the strategy was to ' avoid success at all costs' until the language proved it had begun to meet the goals". The language has been supported in the academic setting, using a manageable number of programmers, which allowed the development of libraries, proven integration with other languages using the Foreign Function Interface and gcc. Theoretical proofs of the correctness of programs was aided by Haskell's close similarity to mathematical notation. The dangers of side-effecting I/O for lazy languages were isolated to monadic I/O. ... -- Ancheta Wis ( talk) 22:24, 5 April 2009 (UTC)
Being more serious I think this should go in a lower section. Also I think we should use the 5 design goals from the haskell 98 report (since those are "official):
[3] Beyond that I think the rest of what was in the goals section are characteristics. For example lazy and pure. jbolden1517 Talk 01:06, 6 April 2009 (UTC)
I'm having a tough time seeing how the new for loop example teaches anything. This looks like a slow complex implementation of map to me. Does anyone disagree? jbolden1517 Talk 20:31, 26 April 2009 (UTC)
The syntax highlighting in the code examples looks horrible. It's distracting, makes the examples hard to read, and draws too much attention to some irrelevant details. Furthermore, one-line examples without indentation look too much like short paragraphs of normal text. The general idea of having syntax highlighting might be ok, but the current implementation is so bad that I strongly suggest that we revert back to the version that uses simply "code"-blocks. — Miym ( talk) 11:46, 26 June 2009 (UTC)
It is not clear to me that this article has an overall structure or theme. Here's a draft attempt to plan a rewrite of the Haskell article, to give a comprehensive account of the language http://haskell.org/haskellwiki/WikipediaArticleDesign Dons00 ( talk) 23:05, 2 August 2009 (UTC)
Please comment.
{{
cite web}}
: Unknown parameter |month=
ignored (
help)
{{talkarchive]]
This page is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
1What's meant by an "eager" variation? I worked with functional languages for some amount of time and never heard the term. -- Robert Merkel
Do you have a reference for this statement? -- Taw
Likewise for this unreferenced claim. —The preceding unsigned comment was added by 17.221.40.150 ( talk) 00:08, 13 April 2007 (UTC).
Is it okay to remove this blatant lie? Nobody uses haskell, and this reference hardly has any relation to "the most research is being performed" 85.140.204.113 16:01, 22 July 2007 (UTC)
"Haskell" can also refer to http://www.haskell.edu/, so I'm not moving this page to Haskell. -- Eloquence 16:55 Jan 24, 2003 (UTC)
Not sure about the new version of the Fibonacci sequence example — it's longer than the first one and harder to read IMHO (although it is clever, I admit). Any comments on this? -- Cadr
zipWith
--
CadrI got the idea: can we present both versions on the article and discuss how they work. To be honest, I don't know how the second one works and I want to know why you said it's a clever way. The readers might be fascinated by the fact Haskell is so cool. -- Taku 16:52, Apr 6, 2004 (UTC)
fib@(_:tfib) = 1 : 1 : [ (a+b) | (a,b) <- zip fib tfib ]
Should this article mention Hindley-Milner type inference and the monomorphism restriction? Or is this too detailed information to be included into a encyclopedic article? -- Tobias Bergemann 08:30, 2004 Nov 16 (UTC)
Why the deletion of the 'extensions' section on Hugs98 for .NET? I can't immediately see why it'd be problematic. (And there no rationale provided.) -- Alai 19:36, 19 Jan 2005 (UTC)
On the literate programming page, someone mentioned Haskell as a language that "makes full use of literate programming". As pointed out in the Talk page there, that is not how I remember Haskell, but I'd appreciate if someone could clarify things there. -- Ar 17:08, 2005 Feb 7 (UTC)
Not at all, as far as I know, and not according to our article on Lambda calculus. In Lambda calculus, '.' is used as a syntactic element in lambda abstractions. In Haskell (prelude), f . g = \ x -> f (g x), that is function composition like the "circle operator" in mathematical analysis. --Anon.
I decided to clean up the examples section a bit, which I have now done. The factorial function now has a proper type declaration (best to do these things right...) and a line-by-line explanation.
It's been mentioned previously about explaining the methods behind some of the more involved examples shown (particularly, why the linear-time Fib sequence is so elegant). I'm not sure we should turn Wikipedia into another Haskell tutorial, but if anyone knows places off-site which explain how they work, that would be good. Opinions, anyone?
--Ithika (not yet got account) 81.131.174.201 16:59, 4 September 2005 (UTC)
Since we already use the factorial function as an example, should we also link to "The Evolution of a Haskell Programmer", which provides 20+ increasingly elaborate implementations of this same function? -- Tobias Bergemann 08:36, 20 October 2005 (UTC)
Re the fac example, I'm an Haskell novice, but it seems to me that the guard expression in
fac :: Integer -> Integer fac 0 = 1 fac n | n > 0 = n *fac (n-1)
serves no purpose? The zero case is handled and the only other possibility is n<0 which isn't checked for anyway...could you not replace with the following?
fac :: Integer -> Integer fac 0 = 1 fac n = n *fac (n-1)
-- Jaybee 21:06, 26 April 2006
Can someone knowledgeable about Haskell please add some commentary to the "More Complex Examples" section, similar to what is there for the "Examples" section? The syntax is a bit abstruse for those not already familiar with the Haskell language. Kwertii 18:46, 20 February 2006 (UTC)
I've put in a bit about the linear-time Fibonacci sequence. It seemed that lazy evaluation and infinite lists were the relevant points to make about that bit of code. I don't really know what to say about the others though. The RPN calculator could, I'm sure, be written that way in most functional languages? Ithika 16:48, 11 March 2006 (UTC)
I now have some insight into Haskell, and also some insight into why it is not more popular.
Take a simple example such as fib:
Hugs.Base> fibs = 0 : 1 : [ a+b | a <- fibs | b <- tail fibs ] ERROR - Syntax error in input (unexpected `=') Hugs.Base>
or
Prelude> fibs = 0 : 1 : [ a+b | a <- fibs | b <- tail fibs ] <interactive>:1:5: parse error on input `=' Prelude>
If I can't get a simple 1-line example to run with copy and paste, I'm not likely to want to continue. After reading more books I discovered that
Prelude> let fibs = 0 : 1 : (zipWith (+) fibs (tail fibs))
did indeed work (the list comprehension version doesn't work without special flags).
Why do we have examples which do not work in the standard environment? -- njh 03:51, 3 January 2006 (UTC)
ghci Example.hs
, and type main
to start it. Giving the one-line hack as the first example will only mislead reader as it gives the impression that Haskell has an awkward curly-bracket style syntax, which normally does not. In this respect the interpreter might be wrong for new users but is much better suited for "real" users. For example the interpreter allows you to do more than just execute types in code, such as running the type inferencer on a specific function or browsing modules, which as far as I know th Perl interpreter won't let you. —
Ruud
20:10, 28 January 2006 (UTC)In the Examples section, there is a one-line definition for the fac function. According to Aaron McDaid, the syntax for this definition doesn't work in Hugs. It does work in Ghci. I only use Ghci and had assumed that the different interpreters used the same syntax for entering a definition in one line. If different interpreters really have different syntaxes for this, perhaps we should just get rid of the one-line example, and remove details that are specific to specific Haskell interpreters, as that would be getting rather non-encyclopedic. -- Catamorphism 20:47, 1 March 2006 (UTC)
Resetting indent. This is what I'm thinking of changing near the start of the the Haskell_programming_language#Examples section:
let { fac 0 = 1; fac n | n > 0 = n * fac (n-1) }
fac 5
let { fac 0 = 1; fac n | n > 0 = n * fac (n-1) } in fac 5
I'll wait a while before making this change. Thanks in advance for any feedback. I suppose we don't want to turn this into a full user manual for hugs and ghc(i) Aaron McDaid ( talk - contribs) 15:24, 9 September 2006 (UTC)
Is the infobox correct in asserting that there are no dialects of Haskell? Then why the difference between '98 and all the others? —The preceding unsigned comment was added by Marudubshinki ( talk • contribs) 21:48, 11 April 2006 (UTC2)
This really needs to be clarified:
As it stands suggests that the problem is that Haskell has differences from other languages and that the critic simply wants to suppress diversity. This would not be rational criticsm, because it suggests that the ideal is that only one unique language exist. The problem may have been misphrased to avoid the real criticsm, or it may have been included without there being any real merit behind it. -- ToobMug 01:37, 24 April 2006 (UTC)
Simon Peyton Jones, Paul Hudak, John Hughes, and Philip Wadler are currently working on a paper describing the history of Haskell. This paper is currently in draft state, but will be submitted to the History of Programming Languages conference (HOPL'07) once it is finished. The draft is publically available and already is a very valuable source of information. — Tobias Bergemann 09:55, 4 August 2006 (UTC)
Haskell programming language → Haskell (programming language) – Conformance with WP naming conventions LotLE× talk
I recently started an article for wxHaskell, one of the many bindings for WxWidgets. It has been nominated for deletion as it "Does not assert notability". Please have a look at it and improve it if possible, especially if you are a fan of wxHaskell. Aaron McDaid ( talk - contribs) 13:33, 11 September 2006 (UTC)
"This sentence does not make much sense: he Glasgow Haskell Compiler compiles to native code on a number of different architectures—as well as to ANSI C—using C-- as an intermediate language." --using c-- ?? 128.12.108.147 13:12, 4 March 2007 (UTC)
What's the status of Concurrent Haskell? I've found this reference:
PEYTON JONES, S., GORDON, A., AND FINNE, S. Concurrent Haskell. In 23rd ACM Symposium on Principles of Programming Languages (POPL’96), pp. 295–308.
and it's also recently described in Composable Memory Transaction, 2006.
Bartosz 01:55, 7 March 2007 (UTC)
Say in haskell I wanted to implement the types Z/mZ i.e. "integers mod m" for all integeres m>1. Naturally I'd want to implement the arithmetic operator / for these types. Context: In 1992-3 I faced this prob while writing haskell code for smith reduction for all integral domains where it makes sense. (Which in turn was part of a homological-algebra package). The best I could do was to define a single type Zmod, and replace the binary operator \a \b a/b by a ternary function \a \b \m "a/b mod m" . Which meant that even for the integer type, I had to replace (/) by that ternary function and pass it a dummy argument that it ignored.
Was I missing something then? Is there in newer haskell versions a way to define type schemas? (ie nonconstant type-valued functions of at least one argument). [I suppose not - is Type yet a Type in Haskell?] Or at least to do the stuff mentioned in the above paragraph in a less kludgy way? I guess not - types are untermenschen in haskell, subject to compulsory type checks which had better be "finite" - "infinite" type checking being "inefficient" - so e.g. you cannot write the fixedpoint operator named after Haskell Curry in the language named after Haskell Curry. (nor can you write the noniterative nonrecursive factorial program that works by passing a function as an argument to itself, 'cause that function would have "infinite" type. —The preceding unsigned comment was added by 59.93.195.26 ( talk) 03:51, 29 March 2007 (UTC).
Perhaps a pronounciation ought to be given? I suspect it's probably pronounced as the last name of "Beaver" Cleaver's buddy Eddie, but in my head it always sounds closer to Pascal (programming language). -- Belg4mit 18:37, 7 April 2007 (UTC)
Heh, whatever. These code examples are all taken from some sort of freshman Haskell course and are nothing like Haskell code looks like out there in the wild. I note my attempt to add such an example and clean up the current mess has been summarily reverted. —The preceding unsigned comment was added by 193.77.153.149 ( talk) 11:43, 11 May 2007 (UTC).
If you would like to discuss this:
jbolden1517 Talk 13:23, 11 May 2007 (UTC)
I don't really see what aspects of Python are owed in particular to Haskell. Perhaps lazy streams, but is there any evidence that it did so directly? Jogloran 13:14, 13 May 2007 (UTC)
Would you folks say that Haskell supports multiple dispatch? If so, could you update that article? I'm not too sure. It was this section of that article that piqued my curiousity:
One of the things I like about Haskell is that it supports (something like) the above. In Haskell, the first argument isn't special, and typeclasses can be used on any argument:
Aaron McDaid ( talk - contribs) 17:20, 16 December 2007 (UTC)
Single and multiple dispatch are both forms of dynamic dispatch. They come out of the object oriented world where the function (method) to be dispatched to is unknowable until runtime (hence the "dynamic"). In Haskell type classes the choice of function is made statically. As such, the terminology used by Haskellers to describe that kind of behavior is "overloading" and shares more similarities with the statically bound overloading available in languages like C++ and Java than the multiple dispatch of Common Lisp and Dylan or the dynamic single dispatch overriding of C++/Java. One major (and crucial) difference between Haskell type class overloading and C++/Java overloading is that in Haskell the choice of which overloaded function is called may depend on nothing more than the static type of the result. In C++/Java the choice of overloaded method depends on the static types of the parameters only. See the article on monads in functional programming - different unit functions must be chosen based entirely on the expected return type. —Preceding unsigned comment added by 24.94.4.15 ( talk) 14:14, 8 February 2008 (UTC)
I'm not sure that Java generics rise to the level of an influence from Haskell. True, there is the Philip Wadler connection, but IMHO Java's generics are just a form of parametric polymorphism (which pre-dates Haskell, e.g., in ML and Miranda) with the syntactic flavor of C++ templates. Clconway ( talk) 23:22, 4 January 2008 (UTC)
I downloaded GHCi from haskell.org, tried the examples on the Wikipedia page, and found most of them didn't work. This is hugely confusing. One of the examples with "let" that's recommended for Hugs worked for me, which is also confusing since I'm not running Hugs, and the page says GHCi doesn't have that restriction.
I see from the comments above that this problem has come up before. I respectfully suggest that the examples should work with the standard Haskell system. Billgordon1099 ( talk) 05:46, 7 June 2008 (UTC)
What does this mean? Regards, Ben Aveling 08:59, 7 September 2008 (UTC)
Interesting reading; see the original question and answer and related followup. Do we merge these into the article? -- Gwern (contribs) 23:18 19 September 2008 (GMT)
I am a bit nervous about the following recent addition to the lead section: "An open source product of more than twenty years of cutting edge research, it allows rapid development of robust, concise, correct software. With strong support for integration with other languages, built-in concurrency and parallelism, debuggers, profilers, rich libraries and an active community, Haskell allows for the production of flexible, maintainable high-quality software." This text was apparantly copied and pasted from http://www.haskell.org/. While I basically agree with the text, I feel that as written it does sound too much like marketing speech, and I was tempted to revert the edit. Maybe the text could be rephrased or at least supplemented with appropriate references? — Tobias Bergemann ( talk) 08:10, 21 October 2008 (UTC)
The latest addition to the article suggests that mapReduce could be simplified from 1) to 2)
1) mr takes a list, applies a function to it and then reduces the elements based on a criterion
mr criteria operator list = reduce criteria (map operator list)
which can be expressed point-free as 2)
mr = (. map) . (.) . reduce
-- Ancheta Wis ( talk) 18:15, 31 March 2009 (UTC)
Well thank you! Nice to hear you like. Yeah I got a kick out of that one when I worked it out the first time. The one that made a convert out of me was the Eight queens puzzle solutions:
queens :: Int -> Int queens n = map reverse $ queens' n where queens' 0 = [[]] queens' k = [q:qs | qs <- queens' (k-1), q <- [1..n], isSafe q qs] isSafe try qs = not (try `elem` qs || sameDiag try qs) sameDiag try qs = any (\(colDist,q) -> abs (try - q) == colDist) $ zip [1..] qs
I saw that solution and it got me to learn Haskell. Look at those C#/Java/Python solutions comparatively, talk about a mound of boilerplate. Wikipedia has haskell/FP versions all over the place, I personally think this trend is likely to start selling people on FP, at least I hope jbolden1517 Talk 02:28, 1 April 2009 (UTC)
I've removed the goal from the article because it's of little use to people who don't know Haskell (or to those that do) and it's POV too. What if I opened the article about Java and discovered (written with 'we' to show my point):
It may all be factually correct for Haskell and it should all be in the article but not by repeating the project's goals: after reading the article, the reader should be able to conclude whether this holds or not. Simeon ( talk) 15:54, 5 April 2009 (UTC)
Perhaps the goals could be re-instated with a balancing sentence, such as "For twenty years, the strategy was to ' avoid success at all costs' until the language proved it had begun to meet the goals". The language has been supported in the academic setting, using a manageable number of programmers, which allowed the development of libraries, proven integration with other languages using the Foreign Function Interface and gcc. Theoretical proofs of the correctness of programs was aided by Haskell's close similarity to mathematical notation. The dangers of side-effecting I/O for lazy languages were isolated to monadic I/O. ... -- Ancheta Wis ( talk) 22:24, 5 April 2009 (UTC)
Being more serious I think this should go in a lower section. Also I think we should use the 5 design goals from the haskell 98 report (since those are "official):
[3] Beyond that I think the rest of what was in the goals section are characteristics. For example lazy and pure. jbolden1517 Talk 01:06, 6 April 2009 (UTC)
I'm having a tough time seeing how the new for loop example teaches anything. This looks like a slow complex implementation of map to me. Does anyone disagree? jbolden1517 Talk 20:31, 26 April 2009 (UTC)
The syntax highlighting in the code examples looks horrible. It's distracting, makes the examples hard to read, and draws too much attention to some irrelevant details. Furthermore, one-line examples without indentation look too much like short paragraphs of normal text. The general idea of having syntax highlighting might be ok, but the current implementation is so bad that I strongly suggest that we revert back to the version that uses simply "code"-blocks. — Miym ( talk) 11:46, 26 June 2009 (UTC)
It is not clear to me that this article has an overall structure or theme. Here's a draft attempt to plan a rewrite of the Haskell article, to give a comprehensive account of the language http://haskell.org/haskellwiki/WikipediaArticleDesign Dons00 ( talk) 23:05, 2 August 2009 (UTC)
Please comment.
{{
cite web}}
: Unknown parameter |month=
ignored (
help)
{{talkarchive]]