A functional programming language

learn more… | top users | synonyms

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 ...
13
votes
1answer
801 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 ...
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 ...
1
vote
4answers
3k views

Using foldr to append two lists together (Haskell)

I have been given the following question as part of a college assignment. Due to the module being very short, we are using only a subset of Haskell, without any of the syntactic sugar or idiomatic ...
9
votes
5answers
697 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
143 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 { ...
51
votes
5answers
6k views

What can Haskell's type system do that Java's can't and vice versa?

I was talking to a friend about the differences between the type systems of Haskell and Java. He asked me what Haskell's could do that Java's couldn't, and I realized that I didn't know. After ...
18
votes
1answer
901 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 ...
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
393 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
1answer
213 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 ...
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 ...
18
votes
9answers
3k views

Why is the concept of lazy evaluation useful?

It seems lazy evaluation of expressions can cause a programmer to lose control over the order in which their code is executed. I am having trouble understanding why this would be acceptable or desired ...
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 ...
21
votes
3answers
2k views

Different ways to see a monad

While learning Haskell I have faced a lot of tutorials trying to explain what are monads and why monads are important in Haskell. Each of them used analogies so it would be easier to catch the ...
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 ...
25
votes
6answers
3k views

How do you encode Algebraic Data Types in a C#- or Java-like language?

There are some problems which are easily solved by Algebraic Data Types, for example a List type can be very succinctly expressed as: data ConsList a = Empty | ConsCell a (ConsList a) consmap f ...
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 ...
29
votes
2answers
2k views

Why did the Haskell committee choose monads to represent I/O?

The Clean language uses uniqueness types to handle I/O in a purely functional setting. Why did the Haskell committee go with monads instead? Were there other proposals for handling state that the ...
-2
votes
2answers
517 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
276 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 ...
3
votes
2answers
718 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 ...
5
votes
2answers
1k views

What is this algorithm for converting strings into numbers called?

I've been doing some work in Parsec recently, and for my toy language I wanted multi-based fractional numbers to be expressible. After digging around in Parsec's source a bit, I found their ...
0
votes
2answers
575 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. ...
4
votes
4answers
2k views

How is CoffeeScript influenced by Haskell?

I've been using CoffeeScript for a while now. On Wikipedia, it is said that CoffeeScript is influenced by Haskell. But after I check out the syntax of Haskell, I have found little resemblance from ...
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 ...
7
votes
11answers
2k views

Is Object Oriented stuff really that important? [closed]

For years, I have been doing Algorithmic stuff, writing scalable data structures for internet search, for example Randomized Binary Search Trees for Auto Recommendation, BitMaps, Wisdom of Crowd based ...
27
votes
4answers
7k views

Are there any downsides or problems with Haskell?

I'm looking at diving into Haskell for my next (relatively trivial) personal project. The reasons that I'm tackling Haskell are: Get my head into a purely functional language Speed. While I'm sure ...
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. ...
14
votes
4answers
998 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 ...
7
votes
4answers
1k views

A programming language that does not allow IO. Haskell is not a pure language

Are there any 100% pure languages (as I describe in the Stack Overflow post) out there already and if so, could they feasibly be used to actually do stuff? i.e. do they have an implementation? I'm not ...
5
votes
4answers
909 views

what is the object oriented counterpart to haskell / coq

I have detailed information on the latest developments in functional programming. I think haskell is quite an advanced and high level programming language. With coq and agda this gets even more ...
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 ...
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. ...
10
votes
2answers
837 views

Is using F# good enough for learning the important functional programming concepts of Haskell?

I'm coming from Linux and Ruby. I've been interested in learning more functional programming, and in particular the ML-ish style. I've tried reading through the Real World Haskell book and trying some ...
13
votes
5answers
532 views

How should someone used to FP thinking read imperative code?

I graduated from university about five months ago, and have been working in a local startup for past four months. While at university, I studied Haskell, F# etc on my own. We were taught Java at the ...
9
votes
4answers
404 views

STDOUT and its impurity

I've read a lot of books and articles about functional programming and still ashamed of not being able to understand for sure some very basic concepts. One of the main ideas of functional programming ...
12
votes
10answers
1k views

What should I understand before I try to understand functional programming? [closed]

I am pretty well-versed in imperative paradigms. I learned Java and C++ before I dropped out of university, after which I taught myself Python. My problem is that even beginner tutorials get way far ...
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 ...
19
votes
3answers
2k views

Is return-type-(only)-polymorphism in Haskell a good thing?

One thing that I've never quite come to terms with in Haskell is how you can have polymorphic constants and functions whose return type cannot be determined by their input type, like class Foo a ...
13
votes
2answers
448 views

How to handle technological “Dogmatism”

I left a job (to relocate to another country) where I programmed in Javascript and Haskell (some python) most of the time. I really liked it because people were objective, positive, mathematical, and ...
14
votes
5answers
3k views

What is the most compatible, widely used production language to export knowledge and skills gained from Haskell?

I like Haskell, plain and simple. While Haskell is used in production software, it's not especially widely deployed from what I've seen. What is the most similar and still widely used language in ...
9
votes
3answers
1k views

Getters and Setters in Functional Languages

One of the tenets of Functional Programming is the use of Pure Functions. A Pure function is one that is side-effect free and referentially transparent. Getters are not referentially transparent - ...
13
votes
3answers
1k views

How important are Haskell's advanced concepts like Monads and Applicative Functors for most routine programming tasks?

I've read the Learn You a Haskell book up to the point where they introduce Monads and stuff like Just a. These are so counterintuitive for me that I just feel like giving up trying to learn it. But ...
10
votes
4answers
8k views

The Future of Golang. Multiple Language Support? [closed]

Golang seems promising. I've been following this lang since its first release. It might take time to be a very good competitor to other programming languages. One brilliant aspect of Java and .NET I ...
6
votes
8answers
2k views

Learning Haskell and C# Simultaneously

I'm a programmer who's still in his teens. I've been doing some programming for a couple of years now, I started on Ruby, and later switched to Python due to the massive amount of learning resources ...
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 ...
19
votes
4answers
3k views

Is Haskell good at teaching fundamentals of mathematics?

I'm involved in teaching mathematics to classes with requirements such as AS and A level Mathematics specification. Class books normally provide examples of computer software applied to mathematics ...