Why isn't a method (incuding its every single instruction) an object?
>>62160970
Because it's just a block of code that's executed.
You can't create instances of it, it doesn't have state etc.
>why isn't behavior a tangible thing?
>>62160970
language?
>>62160970
It is in JavaScript. Kind of.
Sure they can. If you smoke a bit of the OOP kush your Executors, Services and Strategies are what you want.
An object is a self-contained set of stored values that can be duplicated, passed around, accessed publicly to a certain extent and acted on using methods specific to that object.
While you can duplicate and pass around a function/method, you can't store data in them, you can't modify them (in most languages), and you can't access specific data in them if it isn't returned.
>>62160970
>Why isn't a method (incuding its every single instruction) an object?
It can be.
>>62161979
>While you can duplicate and pass around a function/method, you can't store data in them,
Closures?
>you can't modify them (in most languages)
In some you can, though.
>and you can't access specific data in them if it isn't returned.
Immutable objects exist, as well as private object members too.
>>62160970
depends on the language. js has it, java sort of has it, others have it too
>>62160970
And what would be the use case for that?
>>62162438
You can pass a callback function bound to the object, for example.
>>62162446
Just use a closure.
>what are delegates
>>62161030
physicsfag please go
>>62160970
It can be in a language with reflection
>>62163172
If free standing functions exist in the language, sure.