Functional programing

Eliaquim

Raze: The Rakuen Zero's Guardian!
Veteran
Joined
May 22, 2018
Messages
1,076
Reaction score
446
First Language
Portuguese - Br
Primarily Uses
RMMV
Hi, again people!
Well, I don't know if this is the right place since I want only to have a talk about other perspectives in this case.
What do you think about functional programming?
I have read a lot about that, seems to have some interesting points.
But I'm not sure if I want to code in this way.
Sometimes I think it's cool not to change an original array or a function to be immutable.
But sometimes I think it's kinda boring code in this way of thinking.

So, what you think about that? Do you like it? Why?

Do you don't like it? Why?
Or, what are your thoughts?

I just wanna know the opinions of other programmers besides the articles that I read explaining this subject.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,843
Reaction score
5,524
First Language
Indonesian
Primarily Uses
RMVXA
I don't do functional programming (and by this, I mean writing in actual programming language that works like functional programming such as Haskell), so I have no strong opinion on it, however, the closest functional programming I do is SQL, which order of the execution can be in anything, but it isn't exactly functional programming AFAIK.

Although, based on the definition of functional programming, I personally do it on some occasions, like my Grid Battle System Module. It is basically a collection of functions to calculate position based on input. It does not mutate anything. Just a set of functions. Boring? Nah, not really. Its just something that you have to do because of the requirement or simply the way you think. For me, it is a bit of both.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
1,979
Reaction score
970
First Language
Spanish
Primarily Uses
RMVXA
functional programming appears as a derivation of subroutine programming: each *function* is a closed process on it's own, that unlike a subroutine it always returns a value.
now, depending on the value you want returned, and the code you're running, your functions may vary in structure, but you can't have a function without knowing the structure for a subroutine (which is, a self-contained block within a larger structure), and you can't have a function if the language doesn't *have* a definition for it.
all programming languages that are not machine code are largely the same: they all have data structures (variable, array, hash, table, etc), control structures (loops and conditionals), and procedures (routines, or functions). So, even if you weren't to use functions, already from the get go and following one of the axioms of programming, you must simplify any repetition into it's own structure, which are procedures. IF on top of that you want to make everything return a value and use those values to drive your programs, that's another level of complexity..... but you can't have that without the simplification inherent to programming, period.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Testing out applying a stroke effect to things at player level to increase visibility. Thoughts?

I wonder what cat meat tastes like.

Forum statistics

Threads
95,652
Messages
930,759
Members
125,984
Latest member
paulgbello
Top