• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Functional Design and Architecture - language choice and overall benefits?

 
Greenhorn
Posts: 22
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

When it comes to functional programming paradigm does the language choice matter much in your opinion?

Briefly, in 'couple' sentences or just naming a few in a list, what are  the main benefits of functional paradigm over the others?

Many thanks, lately I have been thinking about all the available paradigm  choices, so far struggling to make sense of it and would appreciate your expert input.
 
Author
Posts: 27
9
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sebastian Makowiecki wrote:Hi there,

When it comes to functional programming paradigm does the language choice matter much in your opinion?

Briefly, in 'couple' sentences or just naming a few in a list, what are  the main benefits of functional paradigm over the others?

Many thanks, lately I have been thinking about all the available paradigm  choices, so far struggling to make sense of it and would appreciate your expert input.



Hi Sebastian,

Yep, the choice of a language is an architectural decision and it definitely affects everything that comes after. Let me try to make a short overview of FP languages as how I see this, but my overview won't be exhaustive by any means.

1. Clojure. Very simple FP language, very pleasant to use (#2 of the most loved languages in SO Survey). Fast development cycle, JVM, lovely tools. You'll have to write tests for making your apps reliable. I would avoid writing big programs in Clojure though.
2. Scala. Enterprise-level FP/OOP language. Also JVM. A lot of approaches, solutions, design patterns, architectures. Great for data transformation pipelines. Somewhat a difficult language requires a lot of knowledge. An acceptable mix of FP and OOP.
3. Haskell. Great for financial apps and backends. For blockchains as well. Excellent for concurrent apps. Great for building reliable apps with a minimum of bugs. Small community - this risk is higher than with other languages. Learning can be somewhat challenging. But Haskell is what we call "real FP" today. Most of the mainstream languages borrow ideas from it, and I'd recommend learning Haskell to learn FP in its purest.
4. F#. .NET, MS stack. Well-established, quite ready for production, enough powerful and nicely documented. Not that difficult to learn.

There are other FP languages, for example, JavaScript, but I'm not sure if I need to characterise them.

What about the paradigm itself, let me copy-paste my answer from another thread:

FP:

- Compilers, research, math
- Multithreaded and concurrent applications (if we want a better story with concurrency bugs)
- Data transformations and pipelines (for example, spam filters)
- Very complicated domains. (FP simplifies domain modeling very much)
- Stateless services
- Correctness (statically typed FP works extremely well for such domains as payments, bank software, blockchains etc)

OOP:
- All the traditional uses of OOP
- GUI (for now, FP doesn't work here that well)
- Business software (at least until we find a good way for FP)
- OOP can even work for soft-realtime apps. I wouldn't try FP there.

Hope this helps!
 
Sebastian Makowiecki
Greenhorn
Posts: 22
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you. Indeed an interesting thought to learn a bit of Haskell - never crossed my mind actually.

I actually hoped at least some of the LISP dialects would come up, happy to see Clojure on the list. Conceptually LISP is such an appealing yet so intimidating concept I am always too afraid to go at it as a result. I goota though since it will make me a better person no doubt.
 
Rancher
Posts: 357
21
Mac OS X Monad Clojure Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sebastian Makowiecki wrote:Thank you. Indeed an interesting thought to learn a bit of Haskell - never crossed my mind actually.

I actually hoped at least some of the LISP dialects would come up, happy to see Clojure on the list. Conceptually LISP is such an appealing yet so intimidating concept I am always too afraid to go at it as a result. I goota though since it will make me a better person no doubt.



Clojure is pretty approachable and the community is extremely welcoming to beginners. I've been doing Clojure in production for a decade now and I've never been happier as a programmer!

If you're interested in learning Clojure, the Clojurians Slack is an essential resource (with thousands of folks to help you out). http://clojurians.net will let you sign yourself up and https://clojurians.slack.com is where the action is.

There's also a Clojure forum here on the Ranch -- https://coderanch.com/f/110/clojure -- but it hasn't had much activity in the last couple of years (although I'm always happy to help people in that forum).
 
Willie Smits can speak 40 languages. This tiny ad can speak only one:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic