Aren't Functions also Objects themselves ?
FOP VS OOP
Just avoid mutable state
What is that ?
OOP is for people with an inner monologue.
Function takes parameters, returns something. An object encapsulates values and methods
>Mutable is a type of variable that can be changed. A mutable object is an object whose state can be modified after it is created. ... Immutables are the objects whose state cannot be changed once the object is created. Strings and Numbers are Immutable
What does this have to do with the post
Yes
Yes duh I know what they are but you refer to an object as "" it"" and a function also as "" it"". Would this not imply that functions are in fact 3 dimensional objects since you cannot separate movement from the moving body ?
No, don't be philosophical
Don't confuse logic with philosophy user.
Philosophy is a higher power.
I am talking mere logic here.
Just did a double check, actually. If you mean the OOP object, then no. Computationally functions are objects
Wow. Every program i've ever read makes more sense now
Don't most people have a inner monologue?
> An object encapsulates values and methods
Not in Common Lisp (best programming language). Objects encapsulate merely data and methods can act upon these object but are entirely seperate.
greatest piece of advice I've ever heard
>An object encapsulates values and methods
that's a really vague and shitty definition
cs 101
Functional programming is the future. Keep up, CS undergrads
25% of people do not
This. Initialize all member variables in the constructor. Then treat the object like an immutable piece of data. Fixes all problems with OOP (but then it isnt OOP anymore because OOP is an inherently flawed concept)
I like OOP
FWOCKA