Take the 2-minute tour ×

Functional languages like F# and Scala are becoming popular. Do these types of functional languages make it easier to write higher quality software that requires less testing. In other words, is it easier to write "correct" software that has fewer bugs?

share|improve this question
This is probably a better question for programmers.se –  Ethel Evans Jun 11 '11 at 18:56
Perhaps. Probably crosses domains. Can someone move it? How about a SE feature where a question can live in > 1 world? –  user207 Jun 11 '11 at 19:31
After all, picking the forum is really just adding a tag. –  user207 Jun 11 '11 at 19:37
add comment

2 Answers

Functional languages may make it harder to create some kinds of bugs (e.g. bugs due to misunderstandings about side effects). Of course language acquisition has a learning curve, and there may be more bugs rather than fewer while a developer reaches a certain skill level.
Moreover, bugs arise for all kinds of reasons, some of which have nothing to do with the programming language.

share|improve this answer
1. Let's assume that one has become a competent programmer in the functional language. 2. Are we assuming that those "other reasons" are equal across all languages so we can just ignore them? Given these assumptions, are functional programs easier to write with few bugs? –  user207 Jun 11 '11 at 15:53
Not necessarily. For example, You need to consider the language environment. If you use a functional language, will there be as rich an ecosystem of supporting libraries available is there are for more established, procedural languages? If not, you may need to write more code yourself. The more code you write, the more bugs you will produce. And yes, existing libraries may have bugs too, but if others are using and maintaining them, there are probably fewer bugs than in your brand-new code. –  user246 Jun 11 '11 at 17:41
This is really a topic for a language forum, not a QA forum. Yes, your question is about quality, but no, there are not a lot of functional programming experts/advocates hanging around here. –  user246 Jun 11 '11 at 17:43
add comment

Correctness is subjective. Whether or not software is 'correct' depends on your idea of correctness.

WRT F# and Scala, they are just programming languages. There are benefits and limitiations for the various programming languages. When used by competent developers various programming languages can be employed very effectively in the appropriate context to help develop software solutions.

In a nutshell, it's not the programming language as much as it is the competency of the developer using the language and the context in which it is being used.

share|improve this answer
add comment

Your Answer

