Functional programming is a programming paradigm which makes it easy to create, reason about, and compose functions.
11
votes
4answers
507 views
Does groovy call partial application 'currying'?
Groovy has a concept that it calls 'currying'. Here's an example from their wiki:
def divide = { a, b -> a / b }
def halver = divide.rcurry(2)
assert halver(8) == 4
My understanding of what's ...
1
vote
2answers
143 views
What are/would be the characterists and applications of a programming paradigm where functions can't have statements?
Suppose there is a language where, instead of statements, functions could only be defined in relation to other functions and operators such as partial application and composition. What would be the ...
7
votes
5answers
628 views
Maybe monad vs exceptions
I wonder what are the advantages of Maybe monad over exceptions? It looks like Maybe is just explicit (and rather space-consuming) way of try..catch syntax.
update Please note that I'm intentionally ...
8
votes
5answers
811 views
Can functional programming be used to develop a full enterprise application?
I am just beginning to learn Functional programming (FP). I come from a OOP world, where everything are objects, and most of them are mutable. I have a hard time wrapping around the concept that ...
3
votes
6answers
166 views
Using “off-paradigm” coding practices in an existing codebase
Let's assume, for a second, that you're "the boss", or architect, or whatever position would permit you the authority to decide on the following question:
You work on a product that's existed for a ...
11
votes
3answers
991 views
Scala or Clojure Functional Programming best practices
I did a lot of self-study coding, got some experience with Parallel Programming Models: Actors, Software Transactional Memory, Data Flow.
When I am trying to apply these architectures to real life - ...
11
votes
5answers
234 views
Convert list of 24-hour-precipitation values into total-by-hour
Let's say I have a list of precipitation values by hour, each showing how much rain happened in the prior 24 hours, ordered by date. For example:
{
'2012-05-24 12:00': 0.5, // .5" of rain from ...
6
votes
4answers
1k views
What is the name for a NON-self-calling function?
I have a collection of normal functions and self-calling functions within a javascript file. In my comments i want to say something along the lines of "This script can contain both self-calling and ...
23
votes
2answers
1k views
Why did the Haskell committee choose monads to represent IO?
The Clean language uses uniqueness types to handle IO in a purely functional setting. Why did the Haskell committee go with monads instead? Were there other proposals for handling state that the ...
12
votes
7answers
1k views
Are functional languages better at recursion?
TL;DR : Do functional languages handle recursion better than non-functional ones?
I am currently reading Code Complete 2. At some point in the book, the author warns us about recursion. He says it ...
5
votes
2answers
224 views
Does the structured programming definition only consider imperative programming?
Does the structured programming definition only consider imperative programming? By this I mean does the definition of structured programming automatically exclude functional programming (in the most ...
-2
votes
2answers
405 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 ...
9
votes
6answers
599 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
609 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
206 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 ...
13
votes
5answers
1k 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
378 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
325 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
599 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 ...
17
votes
6answers
1k 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
778 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
194 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 ...
2
votes
4answers
434 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
139 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 ...
6
votes
3answers
342 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
513 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
907 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
450 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
525 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 ...
18
votes
3answers
957 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?
7
votes
3answers
304 views
choosing a functional language platform for a new project
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 ...
10
votes
3answers
609 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
430 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
1k 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
174 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
2answers
398 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 ...
11
votes
4answers
466 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 ...
7
votes
3answers
2k 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). ...
23
votes
5answers
2k 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
150 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 ...
4
votes
8answers
347 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 ...
19
votes
10answers
1k 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
247 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
437 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 ...
8
votes
3answers
600 views
Is there any material on practical programming in Coq?
I just finished reading Coq in a Hurry, which is a very good tutorial I found online. I got very exited about Coq.
Is there any material on practical programming in Coq? Like printing the result of a ...
4
votes
3answers
770 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
481 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 ...
10
votes
5answers
1k 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
739 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
305 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 ...