• Log in or sign up for an account here: https://www.sythe.org/login

FP

iJava

 ● Developer | Available for Hire 

$200 USD Donor New
Joined
Nov 21, 2011
Sythe Gold
494
Messages
1,207
Discord Unique ID
220055593568829441
PHP Shit Show 2k26
Whats your guys thoughts on functional programming? Have you tried it? Do you like/dislike it and why?

Personally I enjoy writing pure functions which don't rely on state and are easy to test, also helps you me to keep my fields immutable which means I have a lot more confidence in making processes concurrent.

Interested to get other peoples opinion, that's only my brief one.
 
Nitro Booster
CoolHam
Sythe Awards 2017 Winner
Two Factor Authentication User
Discord Verified
Toast Wallet User
I don't know any purely functional languages but I do a lot of Java, and I haven't used any of the Java lambda stuff very much since Java 8 came out. I think it's because I read an article which said it was very poorly optimised a while ago and I've never had any particular need to use it over other solutions. I imagine I'll have to start using it eventually though.
 
PHP Shit Show 2k26
I don't know any purely functional languages but I do a lot of Java, and I haven't used any of the Java lambda stuff very much since Java 8 came out. I think it's because I read an article which said it was very poorly optimised a while ago and I've never had any particular need to use it over other solutions. I imagine I'll have to start using it eventually though.

Yeah I wouldn't really recommend java 8 lambdas to anyone, you're better off using a language which is largely aimed at being functional.
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
I'm very much so into Haskell. For certain problems it really shines but my biggest love for it is the type checking and the fact that the concepts are slowly being brought into other programming languages (like Java or C++ or C#) that make our lives so much better in them.
 
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
I did a lot of Elixir a couple months back and really liked it. I made three web scrapers to compare languages. I used Java, SmallTalk, and Elixir. The Elixir version was short, very readable, concise, and easily debugged. The Java version was similar but was much longer. Don't even get me started on fucking SmallTalk though. I can appreciate what they were going for with that language but holy hell the environment (Pharo) is the worst. The documentation is also some of the worst I've ever seen.

Anyway, I feel like FP is absolutely fundamental to any programmer's repertoire of knowledge. It teaches a lot of really important concepts that are transferable to OOP. Immutability is a very good way to "force" modularity. I don't know that I'd ever use FP to develop anything serious though. Small, specific tasks? Hell yes. Full programs? Unlikely.
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
I did a lot of Elixir a couple months back and really liked it. I made three web scrapers to compare languages. I used Java, SmallTalk, and Elixir. The Elixir version was short, very readable, concise, and easily debugged. The Java version was similar but was much longer. Don't even get me started on fucking SmallTalk though. I can appreciate what they were going for with that language but holy hell the environment (Pharo) is the worst. The documentation is also some of the worst I've ever seen.

Anyway, I feel like FP is absolutely fundamental to any programmer's repertoire of knowledge. It teaches a lot of really important concepts that are transferable to OOP. Immutability is a very good way to "force" modularity. I don't know that I'd ever use FP to develop anything serious though. Small, specific tasks? Hell yes. Full programs? Unlikely.

I'm writing a Haskell program to parse Sythe pages to extract information from them and it's going pretty well. It might be easier in another language but maybe not. I'm moving along at a decent pace even though I'm not great at Haskell and the library I'm using is rather old.
 
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
I'm writing a Haskell program to parse Sythe pages to extract information from them and it's going pretty well. It might be easier in another language but maybe not. I'm moving along at a decent pace even though I'm not great at Haskell and the library I'm using is rather old.

You should take a look at Elixir. It uses the Errlang VM and has similar syntax but without the fuck-uppery. I never liked Haskell.
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
You should take a look at Elixir. It uses the Errlang VM and has similar syntax but without the fuck-uppery. I never liked Haskell.
I really like Haskell. What didn't do it for you?
 
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
I really like Haskell. What didn't do it for you?
School probably ruined it. In my FP class we learned a new language every week and a half or so and redid the same assignment in each one. Haskell was the last one and I had exams to study for in the FP class and every other class too so it was rushed and unenjoyable.
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
School probably ruined it. In my FP class we learned a new language every week and a half or so and redid the same assignment in each one. Haskell was the last one and I had exams to study for in the FP class and every other class too so it was rushed and unenjoyable.
I had to take a class like that. I had an entire class about Haskell and I really enjoyed it. Learning about monads and higher order functions and lazy evaluation has been really cool and I see the concepts that Haskell has coming more and more into other languages. I don't think you really need to learn multiple functional languages but Haskell is really cool none the less.
 
PHP Shit Show 2k26
I did a lot of Elixir a couple months back and really liked it. I made three web scrapers to compare languages. I used Java, SmallTalk, and Elixir. The Elixir version was short, very readable, concise, and easily debugged. The Java version was similar but was much longer. Don't even get me started on fucking SmallTalk though. I can appreciate what they were going for with that language but holy hell the environment (Pharo) is the worst. The documentation is also some of the worst I've ever seen.

Anyway, I feel like FP is absolutely fundamental to any programmer's repertoire of knowledge. It teaches a lot of really important concepts that are transferable to OOP. Immutability is a very good way to "force" modularity. I don't know that I'd ever use FP to develop anything serious though. Small, specific tasks? Hell yes. Full programs? Unlikely.

Interesting, I would without a doubt use FP for a full program. The reinforcement it provides on immutability forces me to writer cleaner code that I can trust has a greater level of thread safety than if I was mutating state all the time.

There are certain places you have to mutate but wherever I can I don't which is in 95% of applications I create.

Never used Elixir but it looks interesting but I think I'd learn Clojure over it.
 
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
Interesting, I would without a doubt use FP for a full program. The reinforcement it provides on immutability forces me to writer cleaner code that I can trust has a greater level of thread safety than if I was mutating state all the time.

There are certain places you have to mutate but wherever I can I don't which is in 95% of applications I create.

Never used Elixir but it looks interesting but I think I'd learn Clojure over it.

I think it's just a matter of easy modularity. I don't know that I've spent enough time with FP to really nail any sort of proper maintenance and continuity tactics but OOP is, for me, infinitely easier to change and manipulate with patches and updates. That's why I feel like FP is better suited for smaller tasks, where the code is shorter and more easily maintained.
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
I think it's just a matter of easy modularity. I don't know that I've spent enough time with FP to really nail any sort of proper maintenance and continuity tactics but OOP is, for me, infinitely easier to change and manipulate with patches and updates. That's why I feel like FP is better suited for smaller tasks, where the code is shorter and more easily maintained.

Functional languages really force you to break everything up into small modular components or it just doesn't work well. Ideally any program you write will be a few generic libraries stuck together to do one specific task well. I can a test to the fact that making even small changes is a big pain in the ass.

Haskell is actually really nice to write quick scripts in for stuff you might use bash for. The only reason not to is the type checking can be a tad annoying and you have to manage compiling and stuff which makes me reach for bash instead but I still find it much easier to compose the simple building blocks in haskell than I can in like c++ or java.[/QUOTE]
 
Last edited:
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
Functional languages really force you to break everything up into small modular components or it just doesn't work well. Ideally any program you write will be a few generic libraries stuck together to do one specific task well. I can a test to the fact that making even small changes is a big pain in the ass.

Haskell is actually really nice to write quick scripts in for stuff you might use bash for. The only reason not to is the type checking can be a tad annoying and you have to manage compiling and stuff which makes me reach for bash instead but I still find it much easier to compose the simple building blocks in haskell than I can in like c++ or java.

Elixir bro

Also typically for quick scripts at the moment I'll avoid bash like the plague and go for straight C
 
Last edited:
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
Elixir bro

Also typically for quick scripts at the moment I'll avoid bash like the plague and go for straight C
Ewwww. How do you manage to get stuff like a POST request or something done easily in C?
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
Why not use something like Python?

I'd like to learn Python next, but for now every *nix distro ships with gcc so it's actually easier and more portable than Python.

I mean every Linux box I'm on has python installed so it's normally a pretty safe bet. I keep meaning to learn it but I've just never had any reason to. I've actually written a lot of a random small programs in Node (please kill me) to avoid having to learn something like python (also my team loves node....).
 
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
I mean every Linux box I'm on has python installed so it's normally a pretty safe bet. I keep meaning to learn it but I've just never had any reason to. I've actually written a lot of a random small programs in Node (please kill me) to avoid having to learn something like python (also my team loves node....).

Fucking javascript man
 
duelarena.gg
Back
Top