Talk:Haskell: Difference between revisions
Line 92: | Line 92: | ||
::: Also <code>seq</code> making program analysis more difficult and breaking parametricity. This should have been discussed in a few papers. —''[[User:Ruud Koot|Ruud]]'' 22:21, 3 May 2011 (UTC) |
::: Also <code>seq</code> making program analysis more difficult and breaking parametricity. This should have been discussed in a few papers. —''[[User:Ruud Koot|Ruud]]'' 22:21, 3 May 2011 (UTC) |
||
::::Janis Voigtländer has some papers like that, which should be easy to find. [[Special:Contributions/67.117.145.9|67.117.145.9]] ([[User talk:67.117.145.9|talk]]) 09:10, 3 March 2012 (UTC) |
::::Janis Voigtländer has some papers like that, which should be easy to find. [[Special:Contributions/67.117.145.9|67.117.145.9]] ([[User talk:67.117.145.9|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 [http://www.cs.rice.edu/~taha/publications/conference/pepm07b.pdf 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. [[Special:Contributions/67.117.145.9|67.117.145.9]] ([[User talk:67.117.145.9|talk]]) 06:38, 4 March 2012 (UTC) |
|||
== Non-strict or lazy semantics? == |
== Non-strict or lazy semantics? == |
Revision as of 06:38, 4 March 2012
This is the talk page for discussing improvements to the Haskell article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1 |
Computer science B‑class Mid‑importance | |||||||||||||||||
|
Computing B‑class Low‑importance | ||||||||||
|
To-do list for Haskell:
|
Talkpage use
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)
STM Monad
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
In Haskell, a Bool
type is defined in the standard prelude, defining it as a simple algebraic data type:
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
end removed text
Is there a place for this text in the Haskell-related articles? Perhaps in the Wikibook? Thanks, and all the best, --Jorge Stolfi (talk) 23:34, 30 December 2009 (UTC)
Parallel Haskell variants
Citations for parallel Haskell variants were requested.
- Eden language is a parallel Haskell, see [1] (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 [2], Glasgow parallel Haskell, which is a distributed memory language.
- and there is Multicore Haskell [3] (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 137.248.75.121 (talk) 12:21, 12 January 2010 (UTC)
Merge of Haskell platform, after child pages have been created?
After the article is tagged as too long, we now get pressure to merge? Please add your rationale. --Ancheta Wis (talk) 23:29, 1 March 2010 (UTC)
- 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.
- It does cite more sources now.--77.186.55.226 (talk) 12:09, 9 April 2010 (UTC)
- 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)
- Cnilep, Thank you for the disclaimer; I moved merge tag to appropriate section. --Ancheta Wis (talk) 18:40, 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.--77.186.55.226 (talk) 12:09, 9 April 2010 (UTC)
article evolved. —Preceding unsigned comment added by 77.186.55.226 (talk) 14:07, 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)
- My understanding was that SeL4 wrote a full working microkernel in Haskell, and as they wrote it, they tried out the API and techniques; then they thew the first one away, and wrote the second one in a combination of Isabelle and C. --Gwern (contribs) 11:49 25 August 2010 (GMT)
- 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)
- Also
seq
making 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. 67.117.145.9 (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. 67.117.145.9 (talk) 06:38, 4 March 2012 (UTC)
- Also
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. 67.117.145.9 (talk) 07:10, 3 March 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)
typing mistake?
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:
http://en.wikipedia.org/wiki/List_of_programming_languages
- Tacobake
- It could be Alfa (proof assistant), a descendant of ALF (proof assistant) and precursors 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)
- Added here. —Ruud 00:33, 30 December 2011 (UTC)
Citations in the "Influenced" section
I feel that the "Influenced" section in the sidebar listing languages should include citations, no? — Preceding unsigned comment added by Mybuddymichael (talk • contribs) 15:01, 7 February 2012 (UTC)
- 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 [citation needed] 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. 67.117.145.9 (talk) 07:17, 3 March 2012 (UTC)