
Do I have to learn Functional Programming to get a decent developer job? - mosh_java
Recently I noticed the functional programming is attracting more developers I know and most of them would like to work for big&#x2F;giant development companies like Google and Facebook, do I have to learn a functional programming language or frameworks to get more decent development job?
======
wilsonnb3
Absolutely not. Thinking that you might have to learn functional programming
to get a decent job is a clear indicator that you are in a Hacker News/Silicon
Valley bubble.

The world will run on object oriented and imperative programming for the
foreseeable future. Functional programming is more or less a novelty
professionally, although a highly visible one in certain circles.

~~~
rhwk97
I find the functional programming crowd can be very vocal on a site like
HN...can't tell you how many times I thought..."you know, I should really
learn Lisp" after visiting here!

~~~
yesenadam
Hehe. I started learning Prolog a few weeks ago - not sure why. Maybe after
seeing one more story about it on here, and seeing it on lists of languages
that're good to learn. But didn't know anything much at all....

What a surprise. I _really_ like it. It's really sooo different from any other
language I've tried (C, C++, Python, JS, SmallTalk, Lisp, bash, AWK etc etc) -
Most programming consists of telling the computer how to go about doing
something. None of that in Prolog. You 'just' describe how the solution will
look.[0] And secondly, it's unexpectedly Functional - it's impossible to
change variable values, _or_ iterate.[1] Recursion only. 'Data' is same form
as 'program', the program can change the data/program while running etc. And
even Lispier than Lisp in some ways.

I think I'll be regularly using it in an AWK-like way - and already have been
- quickly writing programs of a couple of dozen lines or less to do things
that would take longer to do otherwise. And there's something cute about it
that AWK has too, maybe it's that it does well in its own unique world. Just
starting that book on how Erlang was 'grown' using Prolog...

I don't know why I wrote this. Prolog was just surprisingly FPish, and if I
hadn't learnt about that stuff, I wouldn't have recognized it, or appreciated
it.

[0] Really, you need a new vocabulary to describe what it's doing. [1] Ok, not
_impossible_.

~~~
vram22
>Just starting that book on how Erlang was 'grown' using Prolog...

What book is that?

~~~
yesenadam
Whoops. Not a book, just a 17 page paper. It's fascinating so far.

 _Use of Prolog for developing a new programming language_ (1992) by
Armstrong/Virding/Williams.

[http://192.121.151.106/publications/prac_appl_prolog.pdf](http://192.121.151.106/publications/prac_appl_prolog.pdf)

~~~
vram22
Thanks, will take a look.

~~~
yesenadam
Armstrong's PhD thesis from 2003 _Making reliable distributed systems in the
presence of software errors_ (295 pages!) has the whole Erlang story,
including an Erlang tutorial, large parts of which are identical to a Prolog
tutorial (or virtually, just substituting -> for Prolog's :-, and ; for .
etc), I would have had no idea how huge the similarities are, had I not become
familiar with Prolog first.

[http://erlang.org/download/armstrong_thesis_2003.pdf](http://erlang.org/download/armstrong_thesis_2003.pdf)

Also, in the 17 page paper, he firstly makes a meta-interpreter, which I've
since noticed is pretty standard in Prolog books, e.g. _The Art of Prolog_ ,
_The Craft of Prolog_. ‎

~~~
vram22
Thanks, will check that too. I remember The Art of Prolog coming up here on HN
a while ago.

------
auslegung
No. However, learning functional programming has been the best thing to
improve my skill as a developer so far, so I highly recommend it

~~~
phaus
Are there any good books/resources to learn functional programming for a
beginner?

I know the syntax for like 5+ languages but I've never made anything beyond
simple command-line programs.

~~~
db48x
I recommend Structure and Interpretation of Computer Programs by Sussman and
Abelson. By the end you'll have learned functional, procedural, and object-
oriented programming, and how they're related.

Both the book
([https://mitpress.mit.edu/sites/default/files/sicp/index.html](https://mitpress.mit.edu/sites/default/files/sicp/index.html))
and a series of video lectures based on it are available online
([https://ocw.mit.edu/courses/electrical-engineering-and-
compu...](https://ocw.mit.edu/courses/electrical-engineering-and-computer-
science/6-001-structure-and-interpretation-of-computer-programs-
spring-2005/video-lectures/))

------
AnimalMuppet
_Have_ to? No. I would guess that 90% of programming is _not_ functional (all
statistics made up on the spot).

Knowing functional will open some doors, in terms of careers, and also some
doors in your mind. Either set of doors may be _helpful_ to have opened, but
neither is _required_ to have a long and profitable career in software.

------
SamReidHughes
Depends on whether you mean functional programming in the small or in the
large. Using map, filter, tail recursion, etc, is child's play. Being explicit
about how your data moves about there system is forced by FP and is what makes
your programs better.

------
UK-Al05
Very few companies are looking for functional developers.

But I'd argue it will make you a more skilled developer.

------
probinso
No. You need to learn Three languages, and at least one of them well.
Preferably these languages hit different paradigms. That is my minimum
requirement for a junior developer.

------
mbrodersen
Functional programming is just another tool in your tool box. Worth learning
the same way OO is worth learning.

------
bwooster
No

------
Khelavaster
No, but your options are limited to Java and embedded shops. You absolutely
ought to understand functional programming to develop .Net- or Javascript-
based applications.

~~~
wahern
Neither C# nor JavaScript provide guaranteed tail-call optimization. The sine
qua non of functional programming is using recursion instead of iteration,
therefore without TCO you can't actually program in a rigorously functional
manner (whether pure or impure).

When people discuss "functional programming" they're typically discussing
high-level, idiomatic functional interfaces like map-filter-reduce. Though
without TCO implementing those interfaces often requires some internal
ugliness, and without first-class functions and lexical closures they won't
compose as well.

TL;DR: Sprinkle the identifiers "map", "filter", and "reduce" in your code and
it'll magically become functional-oriented as far as most people are
concerned. But if you really want to begin to think in a functional mindset,
rewrite your program structure to use recursion instead of iteration. When you
do that for non-trivial code you'll naturally discover and appreciate all the
other functional-oriented approaches, like first-class functions, closures,
currying, etc, even without being told the formal names of those concepts; and
increasingly use functional- rather OOP-based data encapsulation, which in
turn makes it more obvious how and why to minimize data mutation in favor of
pure functions. FWIW, JavaScript supports many of these concepts quite well,
but because of the TCO limitation they're applied rather inconsistently and
not always in the best way.

