Tagged Questions

130
votes
10answers
31k views

Best explanation for Languages without Null

Every so often when programmers are bitching about null errors/exceptions someone asks what we do without null. I myself have some basic idea of the coolness of option types but I don't have the ...
77
votes
7answers
14k views

What are the primary differences between Haskell and F#?

I've searched on the Internet for comparisons between F# and Haskell but haven't found anything really definitive. What are the primary differences and why would I want to choose one over the other?
68
votes
9answers
4k views

How do functional programming languages work?

I was just reading this excellent post, and got some better understanding of what exactly object oriented programming is, how Java implements it in one extreme manner, and how functional programming ...
66
votes
49answers
14k views

Why functional languages?

I see a lot of talk on here about functional languages and stuff. Why would you use one over a "traditional" language? What do they do better? What are they worse at? What's the ideal functional ...
49
votes
26answers
11k views

Is Scala the next big thing? [closed]

I've been learning Scala recently, and it seems like a very very promising general purpose programming language. It has all the good functional programming features, terse syntax, it runs on JVM and ...
47
votes
9answers
3k views

Are FP and OO orthogonal?

I have heard this time and again, and I am trying to understand and validate the idea that FP and OO are orthogonal. First of all, what does it mean for 2 concepts to be orthogonal? FP encourages ...
44
votes
4answers
4k views

Mathematica: what is symbolic programming?

I am a big fan of Stephen Wolfram, but he is definitely one not shy of tooting his own horn. In many references he extols mathematica as a different symbolic programming paradigm. I am not a ...
39
votes
8answers
11k views

Why should I use F#? [closed]

I write client-server based business applications using .Net and C#. Given this, how would F# enable me to write better code? "Better" in any sense, e.g. faster coding, faster execution, better ...
29
votes
16answers
4k views

Multi-Core and Concurrency - Languages, Libraries and Development Techniques

The CPU architecture landscape has changed, multiple cores is a trend that will change how we have to develop software. I've done multi-threaded development in C, C++ and Java, I've done ...
29
votes
9answers
1k views

Why avoid subtyping?

I have seen many people in the Scala community advise on avoiding subtyping "like a plague". What are the various reasons against the use of subtyping? What are the alternatives?
27
votes
2answers
1k views

What are the practical limitations of a non-turing complete language like Coq?

As there are non-Turing complete languages out there, and given I didn't study Comp Sci at university, could someone explain something that a Turing-incomplete language (like Coq) cannot do? Or is ...
26
votes
3answers
4k views

Functional languages targeting the LLVM

Are there any languages that target the LLVM that: Are statically typed Use type inference Are functional (i.e. lambda expressions, closures, list primitives, list comprehensions, etc.) Have first ...
24
votes
12answers
1k views

Which programming language or a library can process Infinite Series?

Which programming language or a library is able to process infinite series (like geometric or harmonic)? It perhaps must have a database of some well-known series and automatically give proper values ...
20
votes
8answers
2k views

Is there a visual modeling language or style for the functional programming paradigm?

UML is a standard aimed at the modeling of software which will be written in OO languages, and goes hand in hand with Java. Still, could it possibly be used to model software meant to be written in ...
20
votes
19answers
984 views

Truly declarative language?

Does anyone know of a truly declarative language? The behaviour I'm looking for is kind of what Excel does, where I can define variables and formulas, and have the formula's result change when the ...
20
votes
4answers
1k views

Why ADTs are good and Inheritance is bad?

I am a long time OO programmer and a functional programming newbie. From my little exposure algebraic data types only look like a special case of inheritance to me where you only have one level ...
19
votes
1answer
438 views

Do we care about the 'past' in FRP?

When toying around with implementing FRP one thing I've found that is confusing is what to do with the past? Basically, my understanding was that I would be able to do this with a Behaviour at any ...
18
votes
6answers
1k views

What does composability mean in context of functional programming?

What do functional programmers mean when they say a certain thing is composable or not composable? Some of the statements of this sort that I've read are: Control structures are not composable. ...
17
votes
10answers
3k views

Writing a functional and yet functional image processing library in Scala

We are developing a small image processing library for Scala (student project). The library is completely functional (i.e. no mutability). The raster of image is stored as Stream[Stream[Int]] to ...
17
votes
4answers
714 views

Generics and Constrained Polymorphism versus Subtyping

In this PDF presentation on Haskell Type Classes, slide #54 has this question: Open Question: In a language with generics and constrained polymorphism, do you need subtyping too? My ...
17
votes
3answers
574 views

Variants or Polymorphic variants?

I noticed that, among OCaml programmers I know, some of them always use polymorphic variants (variants that are not declared, prefixed with a backquote), while other ones never use polymorphic ...
17
votes
8answers
3k views

What's wrong with F#? [closed]

What's wrong with F#? That is, what about the language would make it unsuitable for production environments (excluding the fact that it's not yet officially graduated from MS Research)? I'm ...
16
votes
17answers
2k views

What would be a good functional language to pick up?

I come from a background of a large variety of languages but my only experience with functional programming languages was a brief stint with OCaml. I want to dive a lot deeper into one of these ...
16
votes
6answers
2k views

What is a 'thunk', as used in Scheme or in general?

I come across the word 'thunk' at a lot of places in code and documentation related to Scheme, and similar territories. I am guessing that it is a generic name for a procedure, which has a single ...
16
votes
5answers
1k views

Advantages of subtyping over typeclasses

What are the advantages of OOP subtyping over typeclasses, if any? In other words, now that we have typeclasses, is there any reason to still use OOP subtyping? PS: I am a Scala programmer.
16
votes
5answers
397 views

How does one avoid creating an ad-hoc type system in dynamically typed languages?

In every project I've started in languages without type systems, I eventually begin to invent a runtime type system. Maybe the term "type system" is too strong; at the very least, I create a set of ...
16
votes
3answers
402 views

Disadvantage of unlifted type products?

In Haskell, lifted type products mean that there's a semantic difference between (a,b,c) and (a, (b, c)). If all pattern matches of all products was always irrefutable, then there would be no ...
15
votes
9answers
2k views

Are the functional programming features provided in C# rich enough? What's missing

Are the functional programming features provided in C# rich enough? Would a LISP programmer miss LISP when programming in C#.. whats missing??
15
votes
15answers
997 views

Looking for a functional language [closed]

I'm a scientist working mostly with C++, but I would like to find a better language. I'm looking for suggestions, I'm not even sure my "dream language" exist (yet), but here's my wishlist; IMPORTANT ...
15
votes
1answer
264 views

typing recursive modules

In Leroy's paper on how recursive modules are typed in OCaml, it is written that modules are checked in an environment made of approximations of module types: module rec A = ... and B = ... and C = ...
14
votes
8answers
2k views

If functional languages are really concise, why don't they have a better rank in the language shootout game?

I compared the languages at the language shootout game by their code size only. Here is a summary of what I got (shortest first, grouped by similar score). Python, Ruby, JavaScript, Perl, Lua, PHP, ...
14
votes
3answers
606 views

Can this functionality be implemented with Haskell's type system?

In Scala, the higher order operations on collections always return the best possible type in the context. For example, in case of BitSet, if you map ints to ints you get a BitSet, but if you map ints ...
13
votes
4answers
648 views

Efficacy of sticking to just the functional paradigm in Scala

I recently bought Programming Scala, and have been reading through it. The language definitely isn't what I expected! Specifically, it seems to implement just about every programming language idea I'm ...
12
votes
10answers
2k views

Why is smalltalk not a functional programming language?

With the renewed interest in functional programming languages, I've seen some similitudes between Smalltalk and FPL, namely closures ( BlockClosures in Smalltalk ) Yet, Smalltalk is not a FPL? What ...
12
votes
3answers
645 views

Side-effects in closures, are they still purely functional?

Being relatively new to functional programming, I expend lots of energy wondering “is this the functional way to do things?” Obviously recursion vs. iteration is pretty straightforward and it’s ...
12
votes
3answers
215 views

What is the use of non short-circuiting boolean operators in Erlang?

I am learning Erlang from the LearnYouSomeErlang web-book. One thing that struck me while learning was the non short-circuiting boolean conjunction and disjunction operators viz; and and or. What are ...
11
votes
15answers
830 views

What would make you try (or not try) a new programming language? [closed]

I've been designing a pragmatic programming language for 5 or so years, and it probably won't be released for several more years (probably until after my current and next startups succeed or fail). ...
11
votes
6answers
1k views

truly understanding the difference between procedural and functional

So I'm really having a hard time understanding the difference between procedural and functional programming paradigms. Here are the first two paragraphs from the Wikipedia entry on functional ...
11
votes
6answers
524 views

Complexity of algorithms of different programming paradigms

I know that most programming languages are Turing complete, but I wonder whether a problem can be resolved with an algorithm of the same complexity with any programming language (and in particular ...
11
votes
1answer
296 views

How should FRP work at the top level?

I have been experimenting with creating a Functional Reactive Programming framework for Scala. One thing at the moment I am confused about is how current implementations have dealt with representing ...
10
votes
4answers
583 views

In Haskell, + is a function, (+ 2) is a function, (+ 2 3) is 5. What exactly is going on there?

How is this possible, what is going on there? Is there a name for this? What other languages have this same behavior? Any without the strong typing system?
10
votes
4answers
731 views

Functional Programming and Type Systems

I have been learning about various functional languages for some time now including Haskell, Scala and Clojure. Haskell has a very strict and well-defined static type system. Scala is also statically ...
10
votes
3answers
422 views

Lambda Expressions and Memory Management

How do the Lambda Expressions / Closures in C++0x complicate the memory management in C++? Why do some people say that closures have no place in languages with manual memory management? Is their claim ...
10
votes
3answers
880 views

What is “Total Functional Programming”?

Wikipedia has this to say: Total functional programming (also known as strong functional programming, to be contrasted with ordinary, or weak functional programming) is a programming ...
10
votes
6answers
452 views

For real time programming, does reference counting have an advantage over garbage collection in terms of determinism?

If you were designing a programming language that features automatic memory management, would using reference counting allow for determinism guarantees that are not possible with a garbage collector? ...
10
votes
7answers
580 views

What does it mean for something to “compose well”?

Many a times, I've come across statements of the form X does/doesn't compose well. I can remember few instances that I've read recently : Macros don't compose well (context: clojure) Locks don't ...
10
votes
7answers
620 views

Meaning of Leaky Abstraction?

What does the term "Leaky Abstraction" mean? (Please explain with examples. I often have a hard time grokking a mere theory.)
10
votes
4answers
615 views

Will Haskell be a good choice for my task?

I'm starting a new project and don't know which language to use. My 'must have' requirements are: Be able to run on Windows/LinuxMacOs natively (native executable) – user should be able to just run ...
10
votes
2answers
448 views

What is the difference between def foo = {} and def foo() = {} in Scala?

Given the following constructs for defining a function in Scala, can you explain what the difference is, and what the implications will be? def foo = {} vs. def foo() = {} Update Thanks for the ...
10
votes
4answers
432 views

Algebraic data types outside of functional languages?

Mostly out of curiosity: Which languages that are not solely functional (I'm also interested in multi-paradigm languages - I know that Ocaml and F# are ML dialects with OO added, so they inherit the ...

1 2 3
15 30 50 per page