81 votes
Accepted

How to answer "functional programming is useless"?

What can I use to show the usefulness of functional programming? This is the wrong question, and by trying to answer it you're falling into a trap of accepting and reinforcing the students' ...
Peter Taylor's user avatar
  • 1,673
59 votes
Accepted

Learning fundamental differences between functional programming and Object Oriented Programming

There are beautiful answers to this question already here, and I will not try to reiterate any of the ground that has already been covered. However, something important that I have not seen here so ...
Ben I.'s user avatar
  • 32.9k
38 votes

How to answer "functional programming is useless"?

Hughes is absolutely right, and the following paragraph from his paper hits the nail right on the head: Such a catalogue of “advantages” is all very well, but one must not be surprised if outsiders ...
Mason Wheeler's user avatar
27 votes
Accepted

Which book should I choose to get into the Lisp World?

How to Design Programs is a truly fantastic text. Should you choose to read it, I suspect you will be able to learn many useful things from it. However, I hesitate to recommend it as an answer to your ...
Alexis King's user avatar
16 votes

Learning fundamental differences between functional programming and Object Oriented Programming

Here I will discuss Functional Programming (FP) and Object Oriented Programming (OOP) in a fairly pure form. Actual languages, however often make compromises to allow older forms as well as multi-...
Buffy's user avatar
  • 36k
16 votes

How to answer "functional programming is useless"?

I think the real trick is in teaching the value of Functional Programming rather than trying to teach the value of Functional Programming Languages. The latter will fail the pragmatic approach in ...
Cort Ammon's user avatar
  • 1,031
11 votes

How to answer "functional programming is useless"?

Functional programming knowledge will definitely benefit your students. I think Martin Odersky explains it best here: https://www.youtube.com/watch?v=3jg1AheF4n0 He explains that there needs to be ...
CraigR8806's user avatar
11 votes

How to answer "functional programming is useless"?

Consider what they are saying, discuss with the students, and agree with them that perhaps they are right. Its almost impossible to get anyone interested if they already know that they won't benefit (...
Jay's user avatar
  • 1,884
10 votes

How to answer "functional programming is useless"?

There are two types of learning The two types of learning that are useful are: to solve an immediate problem. as an investment, this is the type that you will mostly do at university. Although you ...
ctrl-alt-delor's user avatar
10 votes

How to answer "functional programming is useless"?

I think it is pretty hard to convince students focused on the here-and-now of a lot of things. However, the teacher's job is to teach them what they need to know, not just what they want to know. ...
Buffy's user avatar
  • 36k
9 votes

Learning fundamental differences between functional programming and Object Oriented Programming

There are already several good answers, but I'd like to add the following. Functional code is (at least in theory) more easily parallellized. This is important because we've about hit the limit of ...
David's user avatar
  • 221
9 votes

Learning fundamental differences between functional programming and Object Oriented Programming

I wouldn’t expect to find a comparison table because OOP and FP are not mutually exclusive concepts. OOP is about encapsulating data in objects behind interfaces and using inheritance to build ...
Robert Fisher's user avatar
9 votes

Learning fundamental differences between functional programming and Object Oriented Programming

FP and OOP are both tools in the box, none of them is better or worse. The same way you would not ask whether to use a hammer or a screwdriver to put in a nail, you should not ask whether to use FP or ...
TwoThe's user avatar
  • 290
8 votes
Accepted

Why isn't Functional Programming Taught First?

The why isn't necessarily related to the relative quality or benefit of the various approaches to the first courses. But some of the comments given to the question capture part of the reasons. First,...
Buffy's user avatar
  • 36k
7 votes
Accepted

How should the paradigm shift associated with functional programming be approached?

Any true paradigm shift requires literally re-wiring the brain. Thinking functionally is not the same as thinking procedurally (for example). The neural pathways of the brain need to be connected ...
Buffy's user avatar
  • 36k
7 votes

Learning fundamental differences between functional programming and Object Oriented Programming

This is a very broad question, so I'm going to point you to a couple places and then give a really short explanation. Wikipedia on paradigms: https://en.wikipedia.org/wiki/Programming_paradigm I'm ...
Cycomachead's user avatar
7 votes

Scheme vs Haskell for introducing functional programming

As the kids these days would say, you're doing it wrong. Let me explain. As I've commented elsewhere, every "full language" has a whole bunch of things that educators would find inconvenient or ...
Shriram Krishnamurthi's user avatar
7 votes

Scheme vs Haskell for introducing functional programming

I suspect there'll be more universities switching from Scheme to Haskell for introductory functional programming (FP) courses, mainly for the 'real world' appeal of Haskell. I see 15 mentions of ...
Miles's user avatar
  • 1,256
7 votes

Which book should I choose to get into the Lisp World?

As someone points out in the comments, Racket is a Scheme implementation. But I wouldn't worry about which Lisp variant you learn at first, not even whether it's a Lisp-2 (Lisp) or Lisp-1 (Scheme); ...
cjs's user avatar
  • 170
6 votes

Mini-Projects that can be covered in an 1 hour Haskell tutorial

The ideas in your question are far too difficult, for a one hour introduction. Yesterday I had a look at Haskell and learnt some. I have over 30 years programming experience (20 years professional). ...
ctrl-alt-delor's user avatar
6 votes

Which book should I choose to get into the Lisp World?

The problem with learning any of the Lisp family of languages after learning several others is that Lisp and its progeny use a different paradigm. Changing paradigms implies changing the way you think....
Buffy's user avatar
  • 36k
5 votes

How to answer "functional programming is useless"?

Give them the following task to implement in plain old Java: Given is a list of Students with their name, area code and average test score. Write a program that calculates and prints out the average ...
TwoThe's user avatar
  • 290
5 votes

Learning fundamental differences between functional programming and Object Oriented Programming

It is difficult to put this into a form that inexperienced undergraduate students will appreciate, but well... "It is commonly the case with technologies that you can get the best insight about how ...
Jared Smith's user avatar
5 votes

Learning fundamental differences between functional programming and Object Oriented Programming

As I read your post, I see your question as simply this: where might I find a thorough comparison between the two [OOP and FP], which can explain which should be used for some kinds of tasks\...
Peter's user avatar
  • 9,082
5 votes

Why isn't Functional Programming Taught First?

I found it strange when first learning Haskell that the language was never used in any of my classes, especially considering how much easier and more obvious it makes the implementation of fundamental ...
Michael0x2a's user avatar
  • 4,005
5 votes

Discrete function is also a math function?

Focus on the idea that the sets can be finite. They don't need to be defined by a formula. Any set of ordered pairs is a relation. If there is a unique second element for any given first element then ...
Buffy's user avatar
  • 36k
5 votes

What is a real-world (production-code) example of a function having default arguments?

Probably the most basic example is Python's print function, which has keyword arguments sep and ...
ncmathsadist's user avatar
  • 2,319
4 votes

Learning fundamental differences between functional programming and Object Oriented Programming

Truth be told you will never truly understand the difference until you actually learn and use both a functional and an object oriented language. I say that as someone who has learnt both object-...
Pharap's user avatar
  • 345
4 votes
Accepted

What 'procedural' habits to break when teaching 'functional' programming?

I undertook this study myself about a year ago. I started working through the Programming Languages MOOCs on Coursera (Part A Part B Part C), which are based on a UW course of the same name. I didn't ...
Peter's user avatar
  • 9,082

Only top scored, non community-wiki answers of a minimum length are eligible