Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are a hardcore group of developers that love functional languages. Whenever I look it just looks pointlessly complicated.

Maybe its because I'm not smart enough? Given that 99% of software is not written in these languages perhaps you have to have a special gene to figure this stuff out. Or maybe its just people trying to be different or trying out things on the fringe.

I'm not sure what the answer is or if I should try harder.



> Whenever I look it just looks pointlessly complicated.

I would say the exact same thing about the imperative style, and I have lived in both the Imperative/OO world and the Declarative/FP world.

> Given that 99% of software is not written in these languages

citation/elaboration required, and not just because SQL and similar tools are declarative like another comment mentioned: a great majority of imperative languages have begun to include/adopt functional programming tools and ideas (map, reduce/fold, lambdas)... perhaps it's because they are extremely useful concepts.


I find it the opposite. Lisp is much easier to write than, say Go. I think the problem is if you're used to the complexity of writing a Spring Boot app (Java) this simplicity of writing in Clojure will confuse you: you think it can't be that simple when in fact it is.

I used to freak out when I'd find the library in Clojure I wanted to use but it had no documentation. Eventually I just started looking at the implementation and I'd see it's like the entire library is 35 lines of code! Or like 102 lines of code! You don't need documentation for something that small.

I've never seen this before in other languages. If you think it's too complicated, you might just be overthinking it.


The need for documentation for a library is not linked to the amount of code it has. In fact, it’s rather sad that the programmer didn’t bother to document such a small thing. It most certainly wouldn’t have been a big task.


Could you share the 35 line library? I’m curious. I recently asked the Common Lisp subreddit why so many of their libraries lack extensive documentation and most agreed it is a wart on the language.


The one that this first happened with is now much bigger and well documented, oh well.

(FWIW: it's shoreleave https://github.com/shoreleave/shoreleave-remote, it allows for exposing a server-side namespace as a client-side API in the browser).


Why are you comparing a framework to a language? Can I not write a Spring Boot app in Clojure?


In this case, I think it's meaningful. If you take https://github.com/scotthaleen/clojure-spring-cloud as a reasonable example of what that would look like, it's (subjectively) ugly as sin. Because you're operating outside idiomatic clojure, there's a lot of incidental complexity and "why would you do it that way?" moments that you wouldn't get with any of the clojure-native, idiomatic web libraries. Yes, you could wrap a lot of it behind more idiomatic facades, but that's still added work you just don't want to have to do.


To be a fair comparison you either need to compare java to clojure or spring boot to whatever the comparable libraries would be in clojure.


Clojure doesn't really have frameworks, though. Every once in a while a framework-like-thing emerges but it quickly decomposes into a few libraries. The level of composition tends to be functions not objects, so there aren't any "taxonomy traps" associated with monolithic things in the OO world.


It took me a long time to get used to functional programming.

For me a big problem was how dense the code can be. I was relying on the verbosity of imperative languages to act as a sort of whitespace.

Another thing is pattern recognition when reading code. I had been using imperative languages for so long that I could mentally gloss over chunks based upon the shape of the code. But functional languages tend to have different shapes from imperative ones so it all looked unfamiliar to me and I got overwhelmed.

Eventually I was able to get passed this stuff and functional languages make a lot more sense to me now. Now I prefer them despite working in Java for my day job.


Whenever I look it just looks pointlessly complicated

Well naturally if all you do is 'look'. Is that how you learnt whatever programming language or style you use now? You just glanced at some code and the necessary cognitive structures leapt with ease into your mind?

perhaps you have to have a special gene to figure this stuff out

Well I'm learning Clojure right now. It doesn't seem complicated to me (though it is unfamiliar enough that I have to think quite hard about how to do things, which strikes me as a good thing). And, for reference, I'd generally place myself in the lower 30% or so of developers in terms of natural ability.

It sounds to me like you're just not very curious about what functional approaches have to offer. Which should be perfectly fine. But your comment sounds like a complaint.


I went thru a magnetic pole swap, if you will. I went from growing up as a kid toying in C , later professional development in c++ and java. In college, had a small taste of functional style and found it difficult for my brain to grok. Later in life I took up clojure, and things started to click. Despite years and years imperative development, my personal preference is for the functional style.

I do find languages like Scala and Haskell slightly appealing, but I find many of the deep concepts and rigid type are orthogonal to the problem I am dealing with at hand. I realize for some working thru the type system helps them solve the problem at hand, but for me, it often seems to get in my way.


Not sure what languages you are referring to with the 99% comment, but declarative programming is extremely well established, and it marries well with functional programming. See: SQL, Excel, regular expressions, HTML. Functional programming is a subset of declarative programming, and there are a wealth of useful applications.


> Maybe its because I'm not smart enough?

I doubt it. It's probably more because you haven't invested the time to actually sit and learn it.


> Whenever I look it just looks pointlessly complicated.

Quite the opposite on my experience. The fact that something is familiar doesn't mean it is free of complications.


Given that C++, Java, C#, VB.NET, JavaScript now have functional programming. features, and Smalltalk always had LINQ like capabilities, there is plenty of software written in functional like languages.

And then there is the whole lot of Scala, Kotlin, Swift, TypeScript, before we even delve that Haskell and OCaml are used by Jane Street, Intel, Microsoft and Facebook, just to throw a couple of names around.

Don't worry, you can use C and Go instead.


Here's a good start to functional programming: don't modify any variables. I'm sure you can get the hang of it. It's pretty simple.


Study SICP




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: