A functional programming language

learn more… | top users | synonyms

62
votes
13answers
28k views

Is Haskell worth learning? [closed]

I am looking at this question primarily from a career point of view, so I hope you answer it accordingly. I am fairly proficient with Python, can write C++ and I am a final year student of computer ...
8
votes
2answers
1k views

Could we build a functional computer?

As mush as FP has done, in the end, all our programs are structured. That is, it doesn't matter how pure or functional we make a them - they are always translated to assembly, so what actually runs ...
1
vote
1answer
650 views

Modern REPL for Haskell - is anybody working on it? [closed]

It's time Haskell had a modern REPL like Mathematica's (or better). Make each calculation run in a separate thread, so user has control over each computation box's resources (ability to pause, play, ...
-1
votes
1answer
114 views

Exclude the zero in the given data in Haskell [closed]

I have a list of integers. Also, I have a function which returns True when the element is non-zero, and returns False when the element is zero (let's call it FUNCTION1). So, how to define another ...
8
votes
1answer
398 views

Necessity to learn haskell language extension for production

Haskell core language is really simple. Coming from an OO background, the main difficulty is to adapt to the pure functional paradigm. While learning "basic" Haskell, I have always considered ...
6
votes
2answers
1k views

Is Haskell/Clojure actually unsuited for dynamic systems such as particle simulation?

I've been told in previous questions that functional programming languages are unsuited for dynamic systems such as a physics engine, mainly because it's costly to mutate objects. How realistic is ...
9
votes
9answers
1k views

Resources for improving your comprehension of recursion? [closed]

I know what recursion is (when a patten reoccurs within itself, typically a function that calls itself on one of its lines, after a breakout conditional... right?), and I can understand recursive ...
16
votes
1answer
778 views

What's the progress on Haskell records?

Recently I stumbled once again on the issues of Haskells records, in particular the uniqueness of field names (it's a pain ...) I already read A proposal for records in Haskell from SPJ and Greg ...
7
votes
2answers
244 views

Why have a wrapper constructor when storing a function in a data type?

I can never do too many Haskell tutorials. There is always something to refine and learn. So, I am working through chapter 10 of Real World Haskell, and everything makes sense. but Why do newtype ...
8
votes
2answers
1k views

Inspirational software for end-users written in Haskell? [closed]

I think great technology is invisible. Besides the usual suspects (GHC, Xmonad, proprietary trading software) what great examples are there of end-user software written in Haskell? I think good ...
2
votes
1answer
271 views

Erlang/Haskell web service to server files [closed]

I have across a thread mentioning that Erlang would not be suited for a web application serving files. I was curious whether anyone had any experience building such webservice with erlang? Would ...
2
votes
1answer
214 views

Good serialization solution for communication between Python AND Haskell programs? [closed]

I found this: http://msgpack.org/ But.. I've never used it, so I don't know what whether it is much good. Anybody has proposals? Basic requirements: serialize as many data structures used ...
7
votes
2answers
285 views

Who first coined the term Higher Order Function and/or First Class Citizen?

I've come to understand that long before Haskell, O'Caml or LISP, higher order functions were an academic research subject and in mathematics, Schönfinkel (in 1967) and Haskell Curry (in 1968) already ...
7
votes
2answers
440 views

What's a good math textbook to have on my desk while studying Haskell? [closed]

I just started learning Haskell and it seems like you can't get too far in the language without being comfortable ( or at least exposed ) to certain branches of mathematics. Unfortunately I have major ...
9
votes
6answers
4k views

Which self balancing binary tree would you recommend?

I'm learning Haskell and as an exercise I'm making binary trees. Having made a regular binary tree, I want to adapt it to be self balancing. So: Which is most efficient? Which is easiest to ...
13
votes
1answer
806 views

Why doesn't Haskell have type-level lambda abstractions?

Are there some theoretical reasons for that (like that the type checking or type inference would become undecidable), or practical reasons (too difficult to implement properly)? Currently, we can ...
18
votes
2answers
2k views

What's the difference in content between Chris Okasaki's 1996 thesis and 1999 book, Purely Functional Data Structures?

I want to read Purely Functional Data Structures. I've easily found the thesis (which is freely available as a PDF), but see that there's a book available also. So I'd like to know what the ...
18
votes
2answers
1k views

How to improve efficiency with functional programming?

I've recently been going through the Learn You a Haskell for Great Good guide and as practice I wanted to solve Project Euler Problem 5 with it, which specifies: What is the smallest positive ...
8
votes
1answer
386 views

Better to use error monad with validation in your monadic functions, or implement your own monad with validation directly in your bind?

I'm wondering what's better design wise for usability/maintainability, and what's better as far as fitting with the community. Given the data model: type Name = String data Amount = Out | Some | ...
26
votes
2answers
2k views

Applying Denotational Semantics to design of Programs

I've read a bit on denotational semantics (DS) and I'm very intrigued about the process of designing computer programs where types and functions have strong and clear mappings to mathematics. Are ...
7
votes
3answers
461 views

Devising test of Haskell's value/reference semantics

In imperative languages, it is trivial to devise a programming test of language's use of "value semantics" or "reference semantics". One could do the following and check the value of a (where Vertex ...
7
votes
1answer
375 views

What monad is the opposite of the error monad in haskell

In the error monad, the first failure halts any execution further just carrying the fault through any following binds. What monad halts on success only carrying forward successes, and basically ...
2
votes
1answer
1k views

Fastest Haskell library sort implementation

I am implementing an application in Haskell and, for sorting, I use the library function Data.List.sort. However, I was wondering whether this is the fastest sort implementation in the Haskell ...
4
votes
1answer
464 views

Why would I use Control.Exception in Haskell?

I'm trying to really master Haskell error handling, and I've gotten to the point where I don't understand why I would use Control.Exception instead of Control.Monad.Error. The way I can see it, I can ...
22
votes
3answers
1k views

Why do some functional languages need software transactional memory?

Functional languages, by definition, should not maintain state variables. Why, then, do Haskell, Clojure, and others provide software transactional memory (STM) implementations? Is there a conflict ...
9
votes
3answers
5k views

Fastest Functional Language

I've recently been delving into functional programming especially Haskell and F#, the prior more so. After some googling around I could not find a benchmark comparison of the more prominent functional ...
3
votes
2answers
341 views

What's the benefit of the Nothing constructor in Haskell?

I'm new to Haskell and I'm not really sold on the Nothing constructor. It sounds like just another silent fail that's going to create headaches down the line. It seems much more useful to throw an ...
28
votes
12answers
3k views

Is Haskell's type system an obstacle to understanding functional programming?

I'm studying Haskell for the purpose of understanding functional programming, with the expectation that I'll apply the insight that I gain in other languages (Groovy, Python, JavaScript mainly.) I ...
3
votes
2answers
719 views

Lazy Processing of Streams

I have the following problem scenario: I have a text file and I have to read it and split it into lines. Some lines might need to be dropped (according to criteria that are not fixed). The lines ...
40
votes
5answers
3k views

Critique of the IO monad being viewed as a state monad operating on the world

The IO monad in Haskell is often explained as a state monad where the state is the world. So a value of type IO a monad is viewed as something like worldState -> (a, worldState). Some time ago I ...
2
votes
1answer
214 views

How do I organize a GUI application for passing around events and for setting up reads from a shared resource

My tools involved here are GTK and Haskell. My questions are probably pretty trivial for anyone who has done significant GUI work, but I've been off in the equivalent of CGI applications for my whole ...
18
votes
1answer
907 views

How often is seq used in Haskell production code?

I have some experience writing small tools in Haskell and I find it very intuitive to use, especially for writing filters (using interact) that process their standard input and pipe it to standard ...
9
votes
5answers
711 views

What's the proper term for a function inverse to a constructor - to unwrap a value from a data type?

Edit: I'm rephrasing the question a bit. Apparently I caused some confusion because I didn't realize that the term destructor is used in OOP for something quite different - it's a function invoked ...
4
votes
1answer
144 views

Naming conventions for newtype deconstructors (destructors?)

Looking into Haskell's standard library we can see: newtype StateT s m a = StateT { runStateT :: s -> m (a, s) } newtype WrappedMonad m a = WrapMonad { unwrapMonad :: m a } newtype Sum a = Sum { ...
14
votes
4answers
1k views

Unit testing statically typed functional code

I wanted to ask you people, in which cases it makes sense to unit test statically typed functional code, as written in haskell, scala, ocaml, nemerle, f# or haXe (the last is what I am really ...
45
votes
4answers
4k views

what is the purpose of arrows?

I am learning functionnal programming with Haskell, and I try to grab concepts by first understanding why do I need them. I would like to know the goal of arrows in functional programming languages. ...
11
votes
8answers
2k views

Why isn't functional language syntax more close to human language?

I'm interested in functional programming and decided to get head to head with Haskell. My head hurts... but I'll eventually get it... I have one curiosity though, why is the syntax so cryptic (in lack ...
11
votes
2answers
396 views

FP for simulation and modelling

I'm about to start a simulation/modelling project. I already know that OOP is used for this kind of projects. However, studying Haskell made me consider using the FP paradigm for modelling a system of ...
8
votes
9answers
3k views

OS choice for functional developing

I'm mainly a .NET developer so I normaly use Windows/VisualStudio (that means: I'm spoiled) but I'm enjoying Haskell and other (mostly functional) languagues in my spare time. Now for Haskell the ...
2
votes
2answers
1k views

Performance of concurrent software on multicore processors [closed]

Recently I have often read that, since the trend is to build processors with multiple cores, it will be increasingly important to have programming languages that support concurrent and parallel ...
8
votes
2answers
1k views

Haskell GUI: how much can be done with Haskell?

I've been wanting to try out graphics in Haskell. From what I've seen, the available libraries are either front-ends to C/C++ libraries, or an abstraction of them with minimal features. The high-level ...
0
votes
1answer
1k views

How to force evaluation in Haskell? [closed]

I am relatively new to Haskell and I am trying to learn how different actions can be executed in sequence using the do notation. In particular, I am writing a program to benchmark an algorithm (a ...
2
votes
1answer
193 views

Haskell Using Source File Problems

I recently started using Haskell Platform. I created a source file using Wordpad and named it add. I tried double clicking it so I can open it in ghci but I get <[1 of 1] Compiling Main ...
2
votes
3answers
313 views

Basis of definitions

Let us suppose we have a set of functions which characterise something: in the OO world methods characterising a type. In mathematics these are propositions and we have two kinds: axioms and lemmas. ...
4
votes
2answers
1k views

Good continuous-integration solutions for Haskell projects [closed]

I am looking for a good CI solution for a haskell project. Ideally something that will work with git. Really basic need (so far) build and run tests after each check in. Some basic reporting would be ...
0
votes
2answers
576 views

why are transaction monitors on decline? or are they?

http://www.itjobswatch.co.uk/jobs/uk/cics.do http://www.itjobswatch.co.uk/jobs/uk/tuxedo.do Look at the demand for programmers (% of job ads that the keyword appears), first graph under the table. ...
-2
votes
2answers
518 views

Where are functional languages used? [duplicate]

Possible Duplicate: Functional Programming in Commercial Software Which problems domains are more suited to functional programming solutions I just wonder where do functional programming ...
6
votes
4answers
277 views

How do I link an domain object in memory to its database records without cluttering the domain with database concerns?

Your domain model contains a set of objects. I'm here presenting a side project, but I have a much more complicated work project falling to its knees because I didn't do a good separation of the ...
6
votes
2answers
230 views

Language that can statically ensure a map's fields are present

If data is simple and objects are complex, I'm curious if there are any existing statically typed languages that would be able to augment(?) a map type into a type with guaranteed fields. I realize ...
6
votes
3answers
383 views

choosing a functional language platform for a new project [closed]

I have been writing code for a few years now and I don't believe I can claim to have a complete knowledge in this job yet. My experience primarily rolls around C# related areas with a decent ...