Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
in a 🥜🐚
Prodecural: do one thing or flow of actions with fixed start and end point
Funxtional: perform granularized bits of code in no concrete order or amount
this is a loose formulation for understanding purposes. -
@beggarboy . I think your concise explanation was a bit too concise. Procedural and functional are not mutually exclusive. Indeed, at the end of the day, all applications are procedural to some degree. Some more so than others with Skyrim and the Google maps API as examples of things near opposite ends of the spectrum. The question itself is a little odd in that it's more appropriate to compare functional vs. OOP and procedural vs. event driven.
-
@norman70688 that's declarative vs whatever the opposite is. Functional languages just happen to be declarative.
-
In procedural code you organise things as a bunch of procedures or lists of "do this, do that" steps. You generally end up specifying everything and it generally has a lower level feel.
Functional programming's distinctive feature is that functions are everyday values and they can be passed to functions and returned from functions just like other values. Eg. a standard "map" function takes a collection to work over, like a list, and a function to apply to every element in that list. That's classic functional programming. Other features generally associated with FP are purity (functions tend to avoid side effects), organising code around function composition, and laziness (code does minimum required), though none of these are actually necessary for FP.
They're not really mutually exclusive. Heck you can mix them as you want. You can do OOP style dynamic dispatch in Haskell (existential types), FP in C, and procedural in Java, they're just not based around it. -
Let's say: a function is a litle procedural program.
U can build up ur understanding starting from here
:) -
@monkeyboy I don't disagree, hence why I declared that it should be taken with a pinch of salt.
Related Rants
-
corjaantje29And the most useless function of the year award goes to...
-
chrisrhymes10At my old job we hired a junior developer. Turned out the junior knew more than all of us. I learnt a lot from...
-
Mb3leb10Dear junior programmers: You will never get hired from what you learned at University You have to study on y...
Silly question: what is the main difference between a procedural programming paradigm and a functional paradigm?
question
procedure
knowledge
function