Hacker News new | ask | show | jobs
by noir_lord 3077 days ago
Depends on your background, if you are .Net maybe F#, Java maybe Kotlin, PHP (and I say this as someone who writes PHP as a day job) maybe any other language in existence.

Functional programming is a completely different conceptual model and even if you don't use it day to day it teaches you some important principles.

1 comments

I have been badly taught Java at university (not sure if the course sucked, or I did, but I am a blunder) and have just found myself drawn into the JS world. I really enjoy the concepts of OO, but I feel like my knowledge is very shallow.

Is it good if I rebuild my foundation on JS? I feel like JS is a bit, uh, messy.

Do yourself a favor (if you want to be a web developer):

Understand JavaScript deeply.

Write your applications in TypeScript.

It’s a bit dated, but read “JavaScript, The Good Parts”. Also, check out the Ramda.js library, which brings quite a few good functional programming (FP) techniques to JS.

Function scope is good.

Closures are good.

Higher order functions are good.

Partial function application is good :-)

Warning: if you get too used to FP style programming in JS, Java will feel quite painful afterward.

Eloquent JavaScript is probably what you are looking for: http://eloquentjavascript.net