Talk:Haskell (programming language)
|This is the talk page for discussing improvements to the Haskell (programming language) article.|
|WikiProject Computer science||(Rated B-class, Mid-importance)|
|To-do list for Haskell (programming language):|
- 1 Talkpage use
- 2 STM Monad
- 3 Stuff removed from Boolean data type article
- 4 Parallel Haskell variants
- 5 Merge of Haskell platform, after child pages have been created?
- 6 Strange fact about L4 in Haskell
- 7 Criticism section doesn't feel right
- 8 Non-strict or lazy semantics?
- 9 Related languages section is a bit messy
- 10 typing mistake?
- 11 Citations in the "Influenced" section
- 12 POV / Market analysis
- 13 List of designers
- 14 Ambiguity of "standardized" on introduction
- 15 Quick sort, just for fun
- 16 Confusing
- 17 Too Technical?
- 18 Software in the Public Interest
Please append your contribution to the foot (the bottom ⊥ ) of this talk page; just click the "new section" tab to start. (This practice helps us when an editor is searching for content in a thread of discussion. This is a reason to keep the threads in temporal order, for ease of archiving and retrieval.) If you are posting to a specific thread, then click the "edit" link on the upper right of that section, and please remember to sign your post with 4 tildes (~~~~).--Ancheta Wis (talk) 23:28, 5 December 2009 (UTC)
Could the STM monad section be moved to Concurrent Haskell? I've just been filling in the concurrency section on this page, including a short summary of STM, so it seems sensible to move the detailed information to the main page. Simonmar (talk) 20:19, 7 December 2009 (UTC)
- Absolutely agree. The amount of STM monad material in this article is much too large. I'll do a move. jbolden1517Talk 00:38, 2 January 2010 (UTC)
Stuff removed from Boolean data type article
The following section was removed from the article Boolean data type:
begin removed text
data Bool = False | True
The operations are defined as ordinary functions and operators:
(&&), (||) :: Bool -> Bool -> Bool True && x = x False && _ = False True || _ = True False || x = x
Parallel Haskell variants
Citations for parallel Haskell variants were requested.
- Eden language is a parallel Haskell, see  (it's Rita Loogen and Yolanda Ortega-Mallén and Ricardo Peña-Marí, Parallel Functional Programming in Eden, Journal of Functional Programming, No. 15 (2005), 3). Eden is a distributed memory language.
- as for others, there is GpH , Glasgow parallel Haskell, which is a distributed memory language.
- and there is Multicore Haskell  (it's Simon Marlow and Simon Peyton Jones and Satnam Singh, Runtime support for multicore Haskell, ICFP '09). It's a SMP language. The implementation available in vanilla GHC with -threaded is the latter. —Preceding unsigned comment added by 22.214.171.124 (talk) 12:21, 12 January 2010 (UTC)
Merge of Haskell platform, after child pages have been created?
- I added the 'merge' tag; sorry for not starting the discussion, and please don't take it as "pressure". I claim no expertise in Haskell, so feel free to take this recommendation with a grain of salt.
- The page Haskell platform cites only one source and includes only a short listing of the tools available in the platform. I don't assume that the page can be much expanded beyond that, so merge might be appropriate.
- Also, regarding the size issue, Haskell (programming language) is not currently tagged as too long. It is only about 25k; Haskell platform is less than 2k. According to WP:Article size, articles smaller than 40k need not be divided for reasons of length. Looking at the history, I see that Haskell (programming language) was split last month. I wasn't aware of that when I came across Haskell platform while patrolling new pages. Note that, unlike Haskell features, the 'platform' article does not contain detailed descriptions.
- I'll leave the rest of the discussion to those more knowledgeable than I. Cnilep (talk) 16:43, 2 March 2010 (UTC)
Haskell is a language with many different implementations (GHC, YHC, Hugs, UHC, ...) of which one (GHC) is included in a software package (Haskell platform). It's like you set up a repository for applications written in a specific language and write tools which provide access to these packages and libraries. Different things.--126.96.36.199 (talk) 12:09, 9 April 2010 (UTC)
Strange fact about L4 in Haskell
The "Applications" section finishes with this sentence: Notably, the first formally verified microkernel, seL4 was developed in Haskell. As far as I've been reading this is (very) incorrect. It seems the microkernel is developed in C and some scattered assembly language, and the code which was developed to verify that kernel-code was in Haskell... —Preceding unsigned comment added by Donkeydonkeydonkeydonkey (talk • contribs) 03:04, 24 July 2010 (UTC)
- As no-one has replied either way for a while regarding this, I will "Be Bold" ;-) and edit it. Please go ahead and revert if you know something I don't know, and my edit is wrong... --Donkeydonkeydonkeydonkey (talk) 16:46, 2 August 2010 (UTC)
- In fact, seL4 had its specification written in Haskell and proven using the Isabelle theorem prover. Then, the specification was translated to C, and the translation was proved also (which is the most of the work), so the final microkernel uses the power of C with the safe components of Haskell.
- More information can be found here: http://www.ertos.nicta.com.au/research/sel4/, and specifically in this paper http://www.ertos.nicta.com.au/publications/papers/Klein_EHACDEEKNSTW_09.pdf (Edit: have an account now) DokReggar (talk) 10:57, 10 December 2010 (UTC)
Criticism section doesn't feel right
The first paragraph just describes a negative of lazy evaluation, not a disadvantage specific to Haskell. If Perl, a language that many programmers criticize for its TMTOWTDI philosophy and arguable lack of readability, and whose code tends to underperform Haskell code compiled with ghc, has no listed criticism section (either for maintainability or performance) on Wikipedia, then I really don't see why Haskell needs one. Also, the second paragraph just sounds like a Haskell supporter's attempt to be overly objective by trying to find something that's technically a negative of the language. I don't think the learning curve of Haskell's syntax and type system is ridiculously steep--certainly not steep enough to warrant going in a Wikipedia criticism section. Dsrguru (talk) 03:12, 23 September 2010 (UTC)
- I think a criticism section is okay, it's likely that readers will want to get an opposing view. I agree that some of it is a bit weak, and that the syntactical argument is about beginners, and not really criticizing the language for general use. I've added links to Harper's blog, which I think is good, informed, and non-native criticism.
- Perhaps we should organize this by topic, most criticism seems to target laziness. —Preceding unsigned comment added by Ketil (talk • contribs) 08:10, 3 May 2011 (UTC)
- Also see Simon Peton Jones's presentation "Wearing the hair shirt". He basically admits that if he would do Haskell over again it would be a pure version of ML with type classes. On the other hand, perhaps it's also useful to list some of the benefits of lazy evaluation here (compositionality, pretty much required for parser combinators and list-of-successes, although a force/delay approach could work). The only non laziness related criticism is based on the sometimes difficult type error messages. Perhaps we can find some more: wild growth of type system extension but no dependent types, GHC being basically having replaced the Haskell 98 standard, problems encounter by commercial companies using Haskell (Galois), ... —Ruud 09:07, 3 May 2011 (UTC)
- Well, let's not go overboard with WP:OR. If the focus is on laziness, perhaps Lennart Augustsson's recent blog post (http://augustss.blogspot.com/2011_05_01_archive.html) listing benefits is useful? Ketil (talk) 12:54, 3 May 2011 (UTC)
- I don't think any of points I mentioned are original research. We just have to find some sources to support them. It's quite difficult finding sources, if you don't know what you are looking for. —Ruud 16:02, 3 May 2011 (UTC)
- Sorry, what I mean is that I think we shouldn't go around collecting any critical statement, but rather look for more comprehensive sources of actual criticism. (Maybe I should've said WP:SYN instead?) Many of the current links are "criticisms" used to motivate research that addresses specific issues. Ketil (talk) 12:58, 4 May 2011 (UTC)
- That whole original research/synthesis prohibition is just there to keep out cranks and other unwanted editors. In general, it shouldn't stand in the way of uncontentious and good editing. That's also sort of what I meant above: try to figure out what coherent message you want to convey first (preferably based on literature research or "expertise") and then find the sources to support it. That's quite different from "collecting any critical statement". —Ruud 12:51, 5 May 2011 (UTC)
seqmaking program analysis more difficult and breaking parametricity. This should have been discussed in a few papers. —Ruud 22:21, 3 May 2011 (UTC)
- Janis Voigtländer has some papers like that, which should be easy to find. 188.8.131.52 (talk) 09:10, 3 March 2012 (UTC)
- I would add, the situation with type system extensions seems to be strategic, they are trying to press as far as they can while keeping the types mostly automatically inferrable. Right now you may need an annotation here and there, but introduce dependent types and you're dealing with another proof assistant where the simplest program is a mountain of work. But, if you really do want to include that criticism, you could cite the Concoqtion paper that says GADT's might become the C++ template metaprogramming of functional languages ;-). I remember seeing a 2-line GADT specification for red-black trees and just being amazed, and it was one of the things that sold me on Haskell. 184.108.40.206 (talk) 06:38, 4 March 2012 (UTC)
- I agree (with both the fact that they are trying to keep type inference decidable and type checking terminating, but with polymorphic recursion, GADTs/OutsideIn(X), UndecidableInstances, etc. both are now theoretically out of reach, although practically the situation is still much better than in Agda or Coq.) There is also the problem that many features (GADTs, type families, functional dependencies) don't appear to be completely orthogonal, dependent types seem much nicer in this respect. The reformulation of the afore mentioned features using type equalities and coercions in the underlying System FC and recent language extensions like KindPolymorphism and ConstraintKinds are improving that situation a bit.
- Still, modern Haskell's type system isn't anywhere near the theoretical elegance of Hindley–Milner (hitting the often quoted "design sweet-spot") or Martin-Löf. On the other hand it is many times more expressive than the former and much more practical than the latter.
- I hadn't seen the Concoqtion paper yet, it looks interesting and I'll be sure to give it a read. It seems to slightly predate the introduction of type families and (re)design of System FC, so some of the criticisms might be a bit dated by now (e.g. "[Haskell does] not provide a direct way to express functions on types" or "in the form they are used in Haskell, GADTs always require that proofs be manipulated at runtime"). —Ruud 12:09, 4 March 2012 (UTC)
Non-strict or lazy semantics?
Does Haskell have non-strict semantics, but is lazily evaluated in practice or is lazy evaluation required? I can imagine so as this can affect the run time of certain functions by an exponential factor. —Ruud 21:46, 12 March 2011 (UTC)
- According to the Haskell Report:
Haskell is a general purpose, purely functional programming language incorporating many recent innovations in programming language design. Haskell provides higher-order functions, non-strict semantics, static polymorphic typing, user-defined algebraic datatypes, pattern-matching, list comprehensions, a module system, a monadic I/O system, and a rich set of primitive datatypes, including lists, arrays, arbitrary and fixed precision integers, and floating-point numbers. Haskell is both the culmination and solidification of many years of research on non-strict functional languages.
- —Ruud 00:21, 13 March 2011 (UTC)
- My understanding is Haskell does not require lazy evaluation (i.e. you could write a call-by-name implementation and it would conform to the standard) but in practice lazy evaluation (graph reduction) is what everyone uses, for the efficiency reasons you mention. The language definition only cares about the denotative semantics and not runtime efficiency. 220.127.116.11 (talk) 07:10, 3 March 2012 (UTC)
- Nod. It's not about the implementation, just the semantics. With strictness analysis you can replace lazy code with strict code in the code generator. A trivial example is any expression that would produce a normal form. x * y * z doesn't need any thunks. E.g. `length` can be translated to a strict tail-recursive strict function, etc. Chrisdone (talk) 15:24, 24 October 2012 (UTC)
Related languages section is a bit messy
Perhaps this section could be more clearly separated into languages that Haskell is derived from (Miranda, ML?), parallel efforts (Clean?) and langauges derived from Haskell (Agda, Disciple)? Ketil (talk) 13:02, 4 May 2011 (UTC)
- It's really, really tricky. Are Gofer and Helium dialects or non-fully-compliant implementations? Is Clean a dialect or a completely separate language? Are Ωmega, Agda and Curry related to Haskell or very different languages with Haskell-like syntax? To be accurate you end up putting each related language into it's own distinct category and that's not very useful either. —Ruud 09:27, 3 June 2011 (UTC)
So under the "influenced by" it lists a language called "Alfl". I cannot find it, with a cursory Google search although ALF keeps coming up, including on Wikipedia.
It is not listed here, either:
- It could be Alfa (proof assistant), a descendant of ALF (proof assistant) and precursor to Agda (programming language). I'd just remove any that are not acknowledged in the Haskell Report from the list, though. —Ruud 00:27, 30 December 2011 (UTC)
- Actually, it wasn't a typo. According to "A History of Haskell: Being Lazy with Class":
Alfl, designed by Hudak, whose group at Yale developed a combinator-based interpreter for Alfl as well as a compiler based on techniques developed for Scheme and for T (a dialect of Scheme) (Hudak, 1984b; Hudak, 1984a).
- —Ruud 21:42, 16 October 2012 (UTC)
Citations in the "Influenced" section
- I completely agree. Feel free to add some ;) —Ruud 17:19, 7 February 2012 (UTC)
- I noticed that in the articles of most other languages (be it Perl, Python, O'Caml, Lua, Fortran), their "Influenced" section is also very rarely cited. This is not a problem specific to this article. Perhaps it is too hard to find a citation for that? IMHO it isn't very helpful to add a "Citation needed" for every single language listed here. Jwchong (talk) 01:35, 9 February 2012 (UTC)
- It should certainly be do-able with a bit of Google-fu. The biggest hurdle is that compared to "Influence by" it's sort of an inverse mapping, which does make it more work (you have to find a document for each language stating it was influenced by Haskell/..., instead of a single or few documents claiming Haskell was influenced by ..., ..., ...) Perhaps the  should only be placed on the "Influenced" caption, but I don't now if that's technically feasible. Those tags do encourage people to find citations, though. —Ruud 11:52, 9 February 2012 (UTC)
The drive-by cn-bombing was inappropriate and is messing up the infobox. I think it's ok to roll it back and put the request here on the talk page. The influences of Haskell on Python (list comprehensions, itertools) and Perl (Pugs) are well known, and I think Ocaml now has a GADT-like construct influenced by Haskell. I don't know the situation with Lua and Fortran (maybe Fortran 2003 generics or something like that). I'd add the proposed C++ Concepts extension that is basically Haskell-like type classes. 18.104.22.168 (talk) 07:17, 3 March 2012 (UTC)
- Indeed, while Stroustrup proclaimed concepts are not type classes, I was still left wondering exactly how they were not supposed to be type classes after his talk. —Ruud 15:12, 4 March 2012 (UTC)
POV / Market analysis
Guys, don't put POV stuff in the article of the form "Haskell is increasingly used in ___". This isn't the place to promote your favorite language. If you want to discuss Haskell adoption in industry, make it a new section or subsection, don't try to get away with using biased sources to support your original research. Be aware of WP:NOR and keep in mind things like: Google is fairly hostile to non-standard languages (source: I am a former Google employee). Peace 22.214.171.124 (talk) 21:02, 29 November 2012 (UTC)
List of designers
Hi Ruud. I re-read the reference and agree with your revert of my edit WRT all known Haskell implementations. You're right. But I don't believe your other recent revert (putting back a cluster of 13 redlinks in the infobox) is a good idea. You cite WP:REDYES, but unless "you intend to create" those articles as policy suggests, then I suggest that 1) WP:REDNOT reminds us that "red links to personal names should be avoided", and 2) these individuals are of unestablished notability (a criteria for creating any link and its article). If the red links are to remain, then I would suggest the list of designers should at least be verifiable so a future editor has context and material to create articles for the designers that are notable. I'll tag that, now. Thanks for considering this. Cheers. --Ds13 (talk) 23:01, 12 December 2012 (UTC)
- If I could put a footnote on the "Designers" label, I would already have done so, but this does not seem to be technically possible. I don't think it would ask too much of the reader to have a quick look at the "Further reading" section before concluding this information is unverifiable.
- Regarding the red links. Yes, I do believe many of them would pass WP:PROF and I want to create articles on several of them in the future. In the mean time I hope the red links will encourage others to help me with this task. I have no objection to unlinking individual entries after a careful examination would lead one to conclude they are unlikely to pass WP:N, but I don't believe that the mass unlinking was a good idea. —Ruud 23:20, 12 December 2012 (UTC)
Ambiguity of "standardized" on introduction
On top section and Haskell(disambiguous) it said, "Haskell (/ˈhæskəl/) is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing."
In what way exactly it is standardized? Are we trying to say Haskell is something like a de facto standard of purely functional programming language?
Of course we aren't arrogant enough to claim Haskell is the de facto standard without the agreement of "purely functional programming language community" independent of Haskell community, are we?
Sure, one can write a paragraph or two to clarify Haskell in what way is well-organized or standardized. However, it is almost untrue and misleading on introductory text. I would be greatly disappointed on the lack of validity and correctness of wikipedia if we don't take this word away(or fix it) as soon as possible. Thanks. 126.96.36.199 (talk) 11:45, 26 February 2013 (UTC)
- Compared to the plethora of languages after Miranda (programming language) (which was in use at research labs before 1982) it was a standard, by design. For me, personally, the convenience of a real language with real semantics serve to make the topics more concrete, as being more mathematical, rather than ad hoc, which most programming languages become. The fact that declarative ideas from foundations-of-mathematics are built in, rather than tacked-on with imperatives, makes the language clearer. It did take time for the ideas to sink in, I admit. Perhaps a statement that some ideas from foundations of mathematics need to be studied first, should be added. --Ancheta Wis (talk | contribs) 13:10, 26 February 2013 (UTC)
Proposal: "Haskell served to standardize many of the functional programming concepts proposed, in an open standard, before 1991."
- It is standardized in the sense that there was a committee who wrote the "Haskell Report" on which several conformant implementations where based. —Ruud 16:48, 26 February 2013 (UTC)
- That's not really a standard, is it. Many languages have been defined on paper, by a committee. Many also have multiple implementations. I admit that, especially in recent times, various companies pushing their agendas and related technologies have made some previously highly regarded standardization bodies, if not laughing stocks, at least less relevant. But I've not seen any evidence that would support calling Haskell a standardized language, especially when the real language definition that matters is de facto and ad hoc. Kumiponi (talk) 20:38, 30 April 2015 (UTC)
Quick sort, just for fun
I would like to add a quick sort example to amaze imperative programmers.
quick_sort :: Ord a => [a] -> [a] quick_sort  =  quick_sort (x:xs) = (quick_sort [a | a <- xs, a < x]) ++ [x] ++ (quick_sort [b | b <- xs, b >= x])
As a result of today's XKCD, I turned to Wikipedia.
It begins, "Haskell /ˈhæskəl/ is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing."
I've read that sentence several times, and checked the links, and I still have no idea *what it is*.
This article desperately needs a lede that explains what the thing is.
- Probably some background information is missing as prerequisite.
- Is the lede of the functional programming article more intelligible than this article's lede?
- Regarding 'non-strict semantics':
- Does expression (computer science) help? I notice that the crucial idea of lazy evaluation (it means non-strict evaluation) is deeper down in the article.
- Regarding 'strong static typing':
- Does it help to note that proofs of correctness motivated the design of the language.
- --Ancheta Wis (talk | contribs) 17:58, 4 January 2014 (UTC)
Someone stuck another damn box template up, this time to complain that the article is too technical. Well, all programming languages are technical and very few make any sense to novices. Haskell is not Logo. I don't think it possible to so condescend to a lay audience to describe what makes one computer programming language different from another without making the article useless to anyone who might want to read it.
- I will remove the tag. __Ancheta Wis (talk | contribs) 09:45, 12 January 2014 (UTC)
- Maybe it is possible to rework part or the whole article to lower the prerequisites. I do agree that the article is quite complex and hard to understand, even though I am not a total newbie on that topic. What is the purpose of this article if it cannot explain why this language is different from the others to someone new to the field? Please do not forget that the aim of Wikipedia is to spread knowledge, not keep it guarded to some sort of elite society. I think we can have a first part that is understandable by everyone, and a second part more technical, so everything is here.
- Side note: the fact that "all programming languages are technical and very few make any sense to novices" is not a valid reason. It is our duty as contributors to make this assumption less true.
#!/bin/DokReggar -talk08:47, 13 January 2014 (UTC)
Software in the Public Interest
Since a small edit war seems to have started, I'll explain why I did the initial revert on this:
- haskell.org is an associated organization of Software in the Public Interest, not a subdivision, and as far as I understand joined initially for the sole reason that the Haskell community was too small alone to afford the bureaucracy of starting a non-profit organization entitled to tax-deductible donations.
- As far as I know, Software in the Public Interest does not "host" any Haskell resources, except for financial ones related to donations. The Haskell community runs its own servers. I think some of them used to be donated by / located at commercial entities like Galois etc., I'm not sure how that is these days.
- I don't know if the article should mention Software in the Public Interest, but if so I don't think it belongs in the History section where it was initially placed.