Functional programming is a paradigm which attempts to solve computational problems by the chained evaluation of functions whose output is determined by their inputs rather than the programme state. In this style of programming, side effects and mutable data are deprecated and usually strictly ...

learn more… | top users | synonyms (1)

9
votes
6answers
692 views

Is there an infinite amount of knowledge in a programming language?

I can program in Java, C#, C, Scala, and Javascript fluently. I'm comfortable with Objective-C, but I don't remember the conventions used for memory management. I can read Python and Ruby and I've ...
8
votes
1answer
1k views

Is the Mercury Programming Language used in the field?

I've strong interests in Functional and Logic programming and Mercury seems like a good blend of the two. Is it used in industry at all? I'm one to learn a language just for the fun of it but it would ...
6
votes
2answers
226 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 ...
21
votes
5answers
2k views

How to make the transition to functional programming?

Lately, I have been very intrigued with F# which I have been working a bit with. Coming mostly from Java and C#, I like how concise and easily understandable it is. However, I believe that my ...
7
votes
6answers
398 views

Don't structure data all the way down

In the blog post Don't structure data all the way down, the author discusses different ways to structure a circle datatype and how to implement the parameters to a Radius function. area({circle, ...
5
votes
6answers
365 views

Do non-pure interpreters still make the guarantees of functional programming?

I am assuming the implementations/compilers/generated C code (referred to hereinafter as generic, 'interpreter') for most functional programming languages are written in non-pure functional languages. ...
8
votes
7answers
656 views

How to introduce your team to functional style of coding?

I have a situation where most people in my group come from an object oriented programming background with little to no understanding of functional programming. Not even basics like closures. Any ...
19
votes
6answers
2k views

how a pure functional programming language manage without assignment statements?

When reading the famous SICP, I found the authors seem rather reluctant to introduce the assignment statement to Scheme in Chapter 3. I read the text and kind of understand why they feel so. As ...
5
votes
3answers
1k views

Learning functional programming [closed]

This question is similar to Choosing a functional programming language. I want to learn functional programming but I am having troubles choosing the right programming language. At the university I ...
2
votes
3answers
225 views

Turning your code inside out (functional style) compared to a OO paradigm

I have find this article Turning Your Code Inside Out and I want to know how this approach described in article is for OO programmers/languages. Is this style of design used in OO ...
3
votes
4answers
658 views

Introducing functional programming constructs in non-functional programming languages

This question has been going through my mind quite a lot lately and since I haven't found a convincing answer to it I would like to know if other users of this site have thought about it as well. In ...
0
votes
1answer
145 views

Syntax logic suggestions

This syntax will be used inside HTML attributes. Here are a few examples of what I have so far: <input name="a" conditions="!b, c" /> <input name="b" /> <input name="c" /> This ...
8
votes
4answers
645 views

Design in “mixed” languages: object oriented design or functional programming?

In the past few years, the languages I like to use are becoming more and more "functional". I now use languages that are a sort of "hybrid": C#, F#, Scala. I like to design my application using ...
10
votes
1answer
847 views

UI patterns in functional languages

I would like to start fiddling with ClojureScript, but I am puzzled about some points. My problem is what is a good way to deal with state changes coming from user interaction, when you trying to work ...
8
votes
5answers
2k views

Data structures in functional programming

I'm currently playing with LISP (particularly Scheme and Clojure) and I'm wondering how typical data structures are dealt with in functional programming languages. For example, let's say I would like ...
2
votes
4answers
931 views

Resources for learning common algorithms by Lisp [closed]

Many books about algorithms and data structures are coded by imperative languages. Is there any book that can show functional programming languages can do the same thing or do them better? In ...
4
votes
3answers
563 views

How to write functionally in a web framework

I love Rich Hickey, Clojure and Haskell and I get it when he talks about functions and the unreliability of side-effecting code. However I work in an environment where nearly all the functions I ...
20
votes
3answers
2k views

Do all functional languages use garbage collection?

Is there a functional language which allows to use stack semantics - automatic deterministic destruction at the end of the scope?
6
votes
3answers
367 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 ...
12
votes
3answers
1k views

Functional Programming For Embedded Software

I was discussing F# and Functional Programming with a friend last night and he brought up an interesting question to me. How would you do embedded software in functional? I mean this seems like a ...
8
votes
5answers
693 views

Change my way of thinking in preparation for functional programming

When switching to a functional style of programming after coming from procedural and OOP, what things do I need to know upfront about "this new way of thinking"? How do you prepare yourself for ...
8
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 ...
3
votes
2answers
187 views

In Functional Programming, should domain-relevant simple functions (e.g., sorts) be reified?

In a functional application, should you wrap common higher-level functions in domain-meaningful names or should you leave them "bare"? For instance, if you have a list of Addresses, and "sorted by ...
4
votes
1answer
542 views

PHP Aspect Oriented Design

This is a continuation of this Code Review question. What was taken away from that post, and other aspect oriented design is it is hard to debug. To counter that, I implemented the ability to turn ...
12
votes
4answers
671 views

Why are cons lists associated with functional programming?

I have noticed that most functional languages employ a singly-linked list (a "cons" list) as their most fundamental list types. Examples include CLisp, Haskell and F#. This is different to mainstream ...
8
votes
3answers
3k views

Functional Programming approach for a simplified game using Scala and LWJGL

I, a Java imperative programmer, would like to understand how to generate a simple version of Space Invaders based on Functional Programming design principles (in particular Referential Transparency). ...
27
votes
5answers
5k views

What is the difference between a function and a lambda?

I'm a little bit confused about 'function' and 'lambda'. I've seen some examples showing that the scheme keyword lambda works very similarly to the JavaScript keyword function, but I really don't ...
1
vote
2answers
190 views

Need help with deciding elements for icon creating application

I'm trying to practice programing by creating a simple application which, I think, I can manage to do in .Net C# in VisualStudio 2010. I'm working on simple application which will let me to create ...
5
votes
8answers
435 views

One-use variables - has any language ever had them?

A principle that I follow is that, when an identifier is established, it should be a signal to the reader that the value referred to is indeed an abstraction which will be used more than once. That ...
22
votes
10answers
2k views

How would Functional Programming proponents answer this statement in Code Complete?

On page 839 of the second edition, Steve McConnell is discussing all the ways that programmers can "conquer complexity" in big programs. His tips culminate with this statement: "Object-oriented ...
5
votes
2answers
291 views

Immutable design with an ORM: How are sessions managed?

If I were to make a site with a mutable language like C# and use NHibernate, I would normally approach sessions with the idea of making them as create only when needed and dispose at request end. ...
3
votes
2answers
545 views

Functional Programming: Are Tuples a viable replacement for Types?

A while ago I decided to learn Haskell to help with learning more "pure functional" ideas that I could apply to F#. Right off the bat it seems as if there's no real types in Haskell like the ones ...
5
votes
3answers
1k views

Are there any “enterprise ready” functional programming languages? [closed]

By "enterprise ready" I am referring to availability of tools: dependency management, build management, message servers, databases, application platforms and servers, and are secure and scale well? ...
5
votes
3answers
620 views

Is the COCOMO model a good argument when defending a programming language choice?

Currently, I'm following a course on embedded software development. The lecturer has chosen J as an architecture language for model-driven software development. J itself is a very terse programming ...
12
votes
5answers
2k views

Is Javascript a Functional Programming Language

Is Javascript a functional language? I know it has objects & you can do OOP with it also, but is it also a functional language, can it be used in that way? You know how OOP became/seems like the ...
3
votes
1answer
1k views

Non-OOP languages advantages and good uses

I'm a C# developer, but I also know Java, JavaScript, XSLT, a little of C and Perl, e some other that I may have forgotten. Still, the paradigm I'm most familiar to is OOP. I have always thought ...
3
votes
2answers
394 views

Functional Low-Level language that can use a webkit view

TL;DR: I need to develop an app which should look kind of the same on desktop and as a website incarnation. Since I am a web dev and have never developed for desktop, I want to use a language that ...
21
votes
1answer
2k views

How to organize functional programs [duplicate]

Possible Duplicate: Functional Programming vs. OOP How to write manageable code with functional programming? In OOP, your basic unit of organization for code is the class. A frequently ...
31
votes
18answers
6k views

What would you do if your client required you not to use object-oriented programming?

I am writing a program to simulate the activity of ants in a grid (PDF). The ant can move around, pick up things and drop things. The problem is while the action of the ants and the positions of each ...
10
votes
3answers
1k views

How to write manageable code with functional programming?

I just started with functional programming (with JavaScript and Node.js) and from the look of things it looks as if the code I am writing would grow to be one hell of a code base to manage, when ...
13
votes
4answers
927 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 ...
3
votes
2answers
358 views

Is it possible to develop a functional language based on PHP opcode?

Is it possible to develop a functional language based on PHP opcode? Similar to Scala/bytecode or F#/CIL Has somebody done this already?
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 ...
12
votes
5answers
1k views

What are functional-programming ways of implementing Conway's Game of Life

I recently implemented for fun Conway's Game of Life in Javascript (actually coffeescript but same thing). Since javascript can be used as a functional language I was trying to stay to that end of ...
25
votes
7answers
1k views

Should one comment differently in functional languages?

I'm just getting started with functional programming and I'm wondering about the correct way to comment my code. It seems a little redundant to comment a short function as the names and signature ...
6
votes
2answers
360 views

Values, types, kinds, and…?

We all know what a value is. A type is the type of a value. A kind is (loosely) the type of a type. A type constructs a value; a kind constructs a type. So what is the type of a kind, a thing that ...
4
votes
3answers
2k views

Most “native”/integrated functional language for Mac OS X development?

If one views the CLR/.NET runtime and associated libraries as the future of windows, then the F# programming language could be seen in that light as the most native functional language. Meaning that ...
13
votes
3answers
2k views

What are combinators and how are they applied to programming projects? (practical explanation)

What are combinators? I'm looking for: a practical explanation examples of how they are used examples of how combinators improve the quality/generality of code I'm not looking for: explanations ...
9
votes
4answers
5k views

Example of where Functional Programming is Superior to Imperative or Object-Oriented Programming? [duplicate]

Possible Duplicate: Which problems domains are more suited to functional programming solutions I've been reading about functional programming. I've been using mostly C#.net recently, and ...
43
votes
5answers
3k 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. ...