[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Yes, it's this thread again. Can any of you OOP experts

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 237
Thread images: 23

File: robot.jpg (190KB, 1280x1233px) Image search: [Google]
robot.jpg
190KB, 1280x1233px
Yes, it's this thread again.
Can any of you OOP experts define what an object is?
For bonus points, I challenge you to provide a definition that passes the C struct test:
It should be impossible to take just any random procedural C program and mechanically transform its structs into objects in a meaningful sense.
If you think your definition passes the C struct test, you must prove it relying only on your original definition (no ad hoc excuses and modifications).
>>
No takers?
>>
An entity that provides a set of functions that operate within the context of its lexically scoped data.
>>
>>61005657
>An entity that provides a set of functions that operate within the context of its lexically scoped data.
Fair enough. No bonus points, though.
>>
File: 1498010911424.gif (2MB, 500x491px) Image search: [Google]
1498010911424.gif
2MB, 500x491px
>>61005124
Traditionally, it's an instantiation of a class. Some languages are different. Getters and Setters do not break encapsulation. Love you.
>>
>>61005754
>Traditionally, it's an instantiation of a class
That doesn't answer the question in a general or useful sense. (what's a "class"?)

>Getters and Setters do not break encapsulation.
Opinion discarded.
>>
>>61005775
>That doesn't answer the question in a general or useful sense. (what's a "class"?)
you asked what an object was, not a class...

>Opinion discarded.
why
>>
>>61005784
>you asked what an object was, not a class...
Your definition relies entirely on another term that you have not defined. It doesn't communicate much useful information on its own.

>why
Because it's an argument about semantics that this thread is specifically trying to side-step.
>>
>>61005124
An object is an instance of a class.
>>
>>61005811
>An object is an instance of a class.
So Javascript and Self objects aren't objects to you?
>>
>>61005803
>Your definition relies entirely on another term that you have not defined
no, the definition of a class is pretty commonly agreed upon. I didn't say class specifically because I knew you'd say >>61005821
, so.

>Your definition relies entirely on another term that you have not defined.
yeah, like an object :)
>>
File: 1493598525859.jpg (30KB, 612x491px) Image search: [Google]
1493598525859.jpg
30KB, 612x491px
>>61005124
>It should be impossible to take just any random procedural C program and mechanically transform its structs into objects in a meaningful sense.

why
>>
>>61005828
>the definition of a class is pretty commonly agreed upon
You know what? Sure. You technically did provide a definition. The way you're going about it doesn't facilitate any useful discussion, though. Also you get no bonus points.
>>
>>61005842
>why
Because a definition that doesn't pass the C struct test isn't particularly interesting to me.
>>
>>61005897
you can do oop in c tho
>>
File: 2588.png (322KB, 411x563px) Image search: [Google]
2588.png
322KB, 411x563px
>>61005886
Sure. But seriously, an object in its purest sense is literally just an instantiation of something.
>>
>>61005124

A long long time ago, in a land far far away, computer programs were small and maintainable.

But then the complexity came. And with the complexity came the bugs. And with the bugs came the terror. Deadlines stared to fall like leaves and all we hold so dear started to fall apart, huge software projects failed and turned money into dust and customers into despair.

Nothing seemed to work against complexity and people already started ran out of courage, but then something happend, than nobody would have expected: the 4 tribes reunited for the first time. To form a big alliance, a gang of four, a last line of defense against the dark denizens of complexity. This army of the doomed took the best practices and methodologies of other disciplines and hence called themselves "Software Engineers".

People already started to cheer, but then they went silent and asked: "But who is going to lead us?"
Nobody said anything for a while, then an old voice silently said:
"Follow my lead."
"Who are you? What makes you think you can lead us?" the people replied.
Then an old knight slowly stood up and said:
"I've had many names. I came down from the lands of the LISP and fought along King Simula I., as well as serving in the Smalltalk and Eiffel wars. I've had a lot of different appearances - too many to name them all. But her I am, wiling to take the challenge. Here is my oath:

OOP is sworn to eternal valor.
His design is by contract.
His weapons are reusable components.
His sword is an instance of SharpThings and made by SharpThingsFactory.
His informations are hidden.
His data structures are tied to the algorithms operating on them.
If his sword will break, he will fight with his knife, if his knife breaks, he will fight with his hands, always following the Liskov substitution principle."

The people replied "that's so cool!" and protected by their white board shields and following their clever tactics (written in UML) they won the battle against the bugs.


The end.
>>
>>61005124
Object something, Object could had inner Objects.
Thing about OOP is about interrelation between objects and operation over objects.

OOP is about express domain problem in a language than several programmer could understand,make easy understand and make software.
>>
>>61005940
>>61005913
I'm not really interested in such definitions because it's unclear from them what unique properties or intrinsic value objects (and by extension, object-oriented programming) are supposed to have.
>>
>>61005124

a thing, person, or matter to which thought or action is directed.
>>
>>61006041
Dude what the fuck it's just a way to structure and think about your code
>>
>>61006052
> it's just a way to structure and think about your code
That's a nice platitude, but it doesn't really address the question or the C struct challenge.
>>
>>61005124
your c struct test is bullshit and you are a lame troll
>>
File: autistic-apu.png (250KB, 740x557px) Image search: [Google]
autistic-apu.png
250KB, 740x557px
>>61006096
>your c struct test is bullshit
Why is it "bullshit" and why are you getting all angry?
>>
>>61006087
that is what it is you fucking moron.
>>
>>61006106
If your entire definition of an object is that "it's an instance of something", who am I to say otherwise? However, I don't find it interesting for a reason I've already explained. Go shitpost somewhere else.
>>
>Yes, it's this thread again.
>Can any of you imperative experts define what an struct is?
>For bonus points, I challenge you to provide a definition that passes the Java object test:
>It should be impossible to take just any random Java program and mechanically transform its
>objects into structs and functions in a meaningful sense.
>If you think your definition passes the Java object test, you must prove it relying only on your original >definition (no ad hoc excuses and modifications).
>>
>>61006165
>managing to miss the point so perfectly
>>
>>61006165
It's impossible to pass the Java object test, anon, because Java objects are glorified structs and functions. Way to go shooting yourself in the foot.
>>
>>61006187
Irony
>>
File: 1476540933228.jpg (4KB, 200x200px) Image search: [Google]
1476540933228.jpg
4KB, 200x200px
>>61006232
Don't use words that you don't understand. It's embarrassing.
>>
>>61005124
Its a struct with functions defined inside, so you cant use them outside the object.
>>
>>61006247
It's a meme you dip
>>
Still no takers?
>>
>>61006230
Oh my how insightful! We have found a strange loop in the matrix! Abort abort!
>>
>>61006187
Please explain the point.
>>
>>61007327
It's not my fault that there's no insight to be gained from your shitpost.
>>
File: le meemee toad.png (26KB, 396x400px) Image search: [Google]
le meemee toad.png
26KB, 396x400px
>>61005124
An object is an instance of a class.

A class is just a data structure with its own methods.
>>
>>61007352
>Please explain the point.
The point is that if your definition of an object doesn't pass the C struct test, then objects (as per your definition) don't have any intrinsic unique or useful properties beyond what's offered by C functions and structs. Proving that structs and functions also don't have any intrinsic or useful properties beyond Java objects achieves nothing.
>>
>>61007580
Lets see you implement private functions in c then :)
>>
>>61007643
Let's see you provide a definition first.
>>
>>61007665
lol
>>
>>61007883
It's trivial to implement "private functions" in C. I just don't see a reason to engage with this, because it's unclear what "private functions" have to do with anything.
>>
>>61007909
>It's trivial to implement "private functions" in C

can you do it in a non kludgy way?
>>
>>61005124
>It should be impossible to take just any random procedural C program and mechanically transform its structs into objects in a meaningful sense.

It's impossible not to be able to take any random procedural C program and mechanically transform its structs into objects in a meaningful sense.

Structs are just objects with only getters and setters as functions.

So, regardless of how you define an object, you can mechanically transform C structs into it.
>>
>>61007955
>can you do it in a non kludgy way?
I don't think your subjective tastes in are relevant here, unless you want to involve specific syntax as part of your definition of an object.
>>
>>61007961
>So, regardless of how you define an object, you can mechanically transform C structs into it.
I can think of at least one definition that can pass the C struct test, but you probably wouldn't agree with it and it doesn't matter. The bottom line is that your inability to do so means that you don't have a concept of an object that offers any unique and useful intrinsic properties over C structs and functions.
>>
File: 1495568873544.gif (73KB, 205x274px) Image search: [Google]
1495568873544.gif
73KB, 205x274px
>>61008001
In a way that's easier or at least as easy as how it's handled in, say, seppels or even Java
>>
>>61008034
This is completely irrelevant as I've already explained. I'm discussing concepts while you're discussing syntax sugar.
>>
>>61008028
lets hear it :)
>>
>>61008050
I tried to give a conceptual definition earlier but you called it "unclear". What exactly do you want?
>>
An object is (sort of) similar to a pointer.

I mean, this:
public class YourObject
{
int x;
YourObject next;
}

public class MainObj
{
YourObject obj = new YourObject();
obj.x = 1;
System.out.println(obj.x)
obj.next = null;
obj.next = new YourObject();
obj.next.x = 2;
System.out.println(obj.next.x);
obj.next.next = null;
}


is almost the same as this:
struct node
{
int x;
node* next;
};

int main()
{
node* head;
head = new node;
head -> x = 1;
std::cout << head->x;
head -> next = null;
head -> next = new node;
head ->next -> x = 2;
std::cout << head->next->x;
head -> next -> next = null;
}


well, at least that's how I understand it.
>>
>>61008082
I'm not sure which conceptual definition you're referring to. Put a reference to it in your next post.
>>
>>61008113
no
>>
>>61008091
Fuck me, the Java part has the method missing. But, at least you get the point.
>>
>>61008145
>But, at least you get the point.
I assume your point was that Java objects are glorified structs?
>>
>>61008175
But standard c-like structs are missing conveniences that make it useful to work with them to accomplish OOP.

It can be done, for sure, but that's what c++ already is.
>>
>>61008175
Not really. My point is that Java objects are SIMILAR to pointers (well, if you look at it in terms of linked lists). But, yes, objects are structs.
>>
>>61008222
fuck, I meant that objects are structs with the ability to have a function/method inside.
>>
>>61008234
TOO LATE FAGGOT
>>
>>61008217
>conveniences
That's another argument about syntax. It misses the point of the thread.
>>
File: wtf-did-i-just-read.jpg (116KB, 536x640px) Image search: [Google]
wtf-did-i-just-read.jpg
116KB, 536x640px
>>61008248
You really like to shitpost in my threads, don't you? Did I hurt your feelings yesterday or something?
>>
>>61008258
The point of the thread was to define what an object is, which has been done multiple times.

Then you follow up with this c-struct autism even though you refuse to elabourate why or how it's relevant to anything at all.

good thread
>>
>>61005124
Do we need to treat a collection of structs as the object?
>>
>>61008280
>The point of the thread was to define what an object is, which has been done multiple times
You mean the "instance of a class" thing? Sure, you can go with that if you really want to exclude a bunch of OOP languages and fail to the C struct test.

>Then you follow up with this c-struct autism even though you refuse to elabourate why or how it's relevant to anything at all
It's up there in the OP, and I actually have elaborated multiple times how it's relevant:
>>61008028
>>61007580
>>61006041
>>
>>61008462
>Do we need to treat a collection of structs as the object?
Not sure what you mean by this.
>>
>>61008487
>I actually have elaborated multiple times how it's relevant:

really? where?
>>
>>61008487
>how it's relevant

Yes. It's ir-
>>
File: (you).jpg (70KB, 488x393px) Image search: [Google]
(you).jpg
70KB, 488x393px
>>61008545
>>61008707
Whatever helps you sleep at night. Go shitpost somewhere else.
>>
>>61008732
> make up constraint about mechanical translation of c structs
> have it pointed out C structs are universally translatable
> claim magic knowledge and refuse to share it
> victory

Shitposts belong in a shitthread.
>>
>>61008732
you're cute :)
>>
File: 1480903561397.jpg (40KB, 500x491px) Image search: [Google]
1480903561397.jpg
40KB, 500x491px
>>61008814
That's basically a long-winded and angry way of admitting that as far as the OOP crowd is concerned, "objects" are glorified structs and functions with no intrinsic value of their own, and that building programs out of "objects" yields no added value. Now combine it with the fact that the supposed tenants of OOP are in no way specific to OOP (except for the anti-feature of inheritance) and you can see why everyone outside your cult thinks that you're a joke.
>>
>>61008873
tenets*
>>
>>61008873
>"objects" are glorified structs and functions with no intrinsic value of their own
true

>and that building programs out of "objects" yields no added value
not
>>
>>61008873

I see what you're going for now. You're just bad at getting your point across and condescendingly mistake your bad communication as others' poorly understanding what you meant.

> it's you

The thing is is that you cannot define a type of object that a struct isn't, but you can create objects that are not structs.

Structs cannot carry reference to the lexical environment which created them, as they do not capture the environment, and C does not support inline functions of any sort to assist them. So any object which can capture its environment is automatically unrepresentable in C structs.

Additionally, you can define objects to send messages to other objects, or have functions which generate complex values unrelated to the struct.

The only way to encapsulate such a thing in a c struct would be to use function pointers and pass the struct to them. However, to do so generically requires complex typing information that is unavailable to structs at run time.

You can then create an adhoc type system using integers, unions, (void *)s or whatever, but at this point you're hitting turing completeness rather than anything specifically to do with c structs.

Mathematically, you can convert anything into a c struct and set of related functions. They're universal computation machines.
>>
>>61009033
>The thing is is that you cannot define a type of object that a struct isn't
Yes you can.

>Mathematically, you can convert anything into a c struct and set of related functions.
That is not relevant to what I asked in any way, shape or form.

The rest of your post has been ignored because it doesn't address the OP.
>>
>>61009103
ur helpless
>>
>>61009103
>Yes you can.

Prove it, or go choke on a bag of dicks and autism.
>>
>>61009139
Not my fault that you're too dumb to understand and address the OP.
>>
>>61009164

>>61008814
>> claim magic knowledge and refuse to share it
>> victory
>>
>>61008091
Wrong, the reference variable acts like a pointer TO the object, the object is just a simple object living in the heap.
>>
pOOP fags on sucide watch
>>
>>61009161
>Prove it
I'm not going to bother with a full definition here because it's hardly relevant, but here's one possibility:
For something to be an object, the validity of its state must depend only on the correctness of its message processing code.

>implying my "victory" depends on my ability to define an object in a way that passes the C struct test
If you weren't so retarded, you'd realize that if it's impossible, that only makes your paradigm even less salvageable.
>>
>>61009309
Throw an exception handler into a setter, boom
>>
people aren't allowed to define words using terms the OP doesn't know: The Thread
>>
>>61005124
Object is a struct + vtable + RTTI.
>>
>>61009347
I think you mistakenly posted in the wrong thread because your response is a non-sequitur to literally everything in this one.
>>
>>61009309
>define an object!
>I'm not gonna do it myself that would be irrelevant

Are you for real?
>>
>>61009408
Um, no? If you have properly defined setters them the objects state will always be correct by way of code only within the object, to the point where its literally even recoverable if some other object tried to give it garbage. Stay in school
>>
>>61009409
You are clearly a literal drooling retard (pretty much like any OOP "programmer"). I don't need to define or prove anything in this thread whatsoever. Nonetheless, I just proved to you that you can define an object in a way that passes the C struct test. I don't need to provide a full definition. You can fill in the blanks yourself however you like, but I did list the property that would make it pass the challenge.
>>
>>61009445
Again, a complete non-sequitur. Very low IQ people in this thread. Sad!
>>
>>61005124
>It should be impossible to take just any random procedural C program and mechanically transform its structs into objects in a meaningful sense.
Why? I don't think anyone argued OOP had hard features that declarative didn't. Both Java and C are Turing complete, after all.
>>
>>61009455
Whatever, fag
>>
>>61009484
He's an idiot don't worry about it
>>
>>61009484
>Turing complete
This is irrelevant. x86 assembly is Turing-complete, but if I were to come up with a new language (let's call it Z) such that you could mechanically decompile a random x86 asm program into something that looks like idiomatic Z, one would start questioning the merit of Z and its idioms.
>>
>>61009530
>>61009517
>low IQ retards patting eachother on the back
Cute. The bottom line is that you objectively did not provide a definition that passes the C struct test. Your opinions about things don't really matter to me.
>>
>>61009553
Your test doesn't make any sense
>>
>>61009575
>Your test doesn't make any sense
Really? Why not? Is it really so hard for your mind to process simple English? What part of it don't you understand?
>>
>>61009657
How it's relevant to anything
>>
>>61009675
Your inability to grasp how it's relevant to anything doesn't matter to me in the least. You either can provide a definition that passes it or you can't. I'm not here to debate whether it's somehow subjectively "relevant" for brainlets or not.
>>
>>61009703
Hey, it's your thread
>>
>responding to this thread
what the fuck are you doing
>>
>>61009733
>Hey, it's your thread
Yes, and for my purposes it's sufficient to establish that most OOP programmers don't have a concept of an object that passes this test. It would, of course, be much more interesting if one of you surprised me by providing an actual definition and showed me a language that adheres to it, but quite predictably it didn't happen.
>>
>>61009854
an actual definition that meets the challenge*
>>
>>61009854
ok
>>
Can any of you PaaS experts define what the cloud is? It should be impossible to take just any random hosting setup and mechanically transform its servers into cloud in a meaningful sense.

Can any of you technical writers define what documentation is? It should be impossible to take just any software system and mechanically read the source code to gain the same knowledge.

Can any of you clean code experts define what readable code is? It should be impossible to just take any clean program and mechanically rewrite it to spaghetti code without losing functionality.
>>
>>61009309
>For something to be an object, the validity of its state must depend only on the correctness of its message processing code

structs can be converted into this merely by having a set of messages corresponding to setting and getting values stored in the object. Is this really the best you can do OP?

> pathetic
>>
File: (you)-.jpg (58KB, 372x450px) Image search: [Google]
(you)-.jpg
58KB, 372x450px
>>61010064
>structs can be converted into this merely by having a set of messages corresponding to setting and getting values stored in the object.
You better be trolling, because that was a painfully moronic assertion to make. You can mechanically convert a struct into a "class" with setters for every field, but there's absolutely nothing preventing another part of the program from using those setters to put your "object" in an invalid state, for instance by providing NULL or a negative number where something else is expected, and that's just the most obvious and trivial example. You are literally retarded if you didn't see this.
>>
File: get-well-soon.jpg (80KB, 640x640px) Image search: [Google]
get-well-soon.jpg
80KB, 640x640px
>>61010045
>more retarded shitposting
Perfectly fine by me. More evidence that OOP programmers can't do it and are incapable of understanding why it's important.
>>
>>61010128
>there's absolutely nothing preventing another part of the program from using those setters to put your "object" in an invalid state,

That's entirely the point of what a setter does tho
>>
>>61010250
>an automatically generated setter magically understands the semantics of the object
I'm sorry, but you are mentally retarded. Shoo.
>>
>>61010276
>magically generated

do you even know whatever it is you think you're talking about? Setters are explicitly given as part of the class definition...
>>
>>61005754
>Traditionally, it's an instantiation of a class.

False, you can have objects without classes.
>>
>>61005940
>instantiation of something
No, you can have objects that are no instantiation of anything.
E.g, taking advantage of closures or lambdas to introduce a scope and then have your object be the lambda.
>>
File: tfw-this-shit-again.jpg (6KB, 139x150px) Image search: [Google]
tfw-this-shit-again.jpg
6KB, 139x150px
>>61010318
>do you even know whatever it is you think you're talking about? Setters are explicitly given as part of the class definition...
Holy shit, you retard. You literally don't understand what you're responding to and why.
>>
>>61010370
that's why I said traditionally. This doesn't include Javascript for example where everything is an object
>>
>>61010370
>False, you can have objects without classes.
Well, he did say "traditionally". Smalltalk and Simula and its descendants all define objects has being instances of a class.
>>
>>61010474
enlighten me
>>
>>61010421
yeah, in this case the object is an instance of a lambda function. That said, I wouldn't call a lambda an object from an OOP perspective
>>
>>61010509
Go back and try to actually follow the exchange, or just shoot yourself outright, you waste of web space.
>>
>>61010546
so, you're just shitposting, got it.

I already told you how traditional OOP covers your special definition of internal correctness.
>>
>>61010155
C++ literally implemented classes on top of structs. It's not some shameful secret that they are equivalent.

If you were slightly more clever than what it took for you to realize this, you might also realize that structures, patterns and conventions have value.
>>
>>61010588
>utterly fails to address the challenge
>assumes i don't know how vtables work
>>
>>61010574
>traditional OOP covers your special definition of internal correctness.
Cool story. You did not provide a definition of an object that passes the C struct test.
>>
>>61010647
>You did not provide a definition of an object that passes the C struct test.

because your test doesn't make any sense. You haven't either.

>but I did!
Yes and I said you can cover that in C++ and Java already.
>>
>>61010661
>because your test doesn't make any sense.
Cool story.

>You haven't either.
Yes I have, though it's completely irrelevant. If I were unable to do so, it would only make things worse for OOP brainlets.
>>
>>61010680
>Yes I have

see >>61010661
It's irrelevant because it doesn't make any sense.

What exactly is your point? That you can handle everything with just procedural programming? Because nobody ever said that wasn't the case.
>>
>>61010722
>it's irrelevant [to me] because it doesn't make sense [to me]
That's because you're a brainlet. What matters to me is that not a single one of you has been able to provide definition that passes it.

>What exactly is your point? That you can handle everything with just procedural programming?
Not even close.
>>
>>61010768
>That's because you're a brainless
or maybe you have no idea what you're talking about :)
>>
File: smug-retard-2.jpg (9KB, 298x379px) Image search: [Google]
smug-retard-2.jpg
9KB, 298x379px
>>61010794
>if i'm incapable of understanding what you're saying it means you don't know what you're saying
Whatever helps you sleep at night, you special kid.
>>
people in /g/ are really falling for this troll this hard baka

>claims to have the highest IQ on the thread because his asperger didn't let him sleep about C structs and OOP objects

whew lad
>>
>>61010919
>another retard who can't address the question in any way
I hope sperging out helps with you deal with your impotence.
>>
>Everyone Comes to the Freak Show
/thread
https://www.youtube.com/watch?v=l0f31ggcSis
>>
File: mfw-you-exist.jpg (17KB, 246x374px) Image search: [Google]
mfw-you-exist.jpg
17KB, 246x374px
>the sheer number of posters in this thread who confuse translating a class into a struct with translating a struct into a class
>>
>>61010128
Every possible value in a c struct is a valid state. The c struct can be represented as your object. You didn't say, can you mechanically translate a bunch of criteria that doesn't exist in the code in order to create a completely different state validating object

Also, if you want valid values, this is something you can't enforce on c structs, invalidating the first assertion you made in the whole fucking thread.

I love you, OP, you fucking retard
>>
>>61011706
Your post is so retarded from every angle that there's no point addressing any of it. Every single thing you said is self-evidently wrong.
>>
>>61006286
Irony
>>
>>61011706
>Every possible value in a c struct is a valid state
This is a non-sequitur.

> You didn't say, can you mechanically translate a bunch of criteria that doesn't exist in the code in order to create a completely different state validating object
That's right. I didn't say this. It's a another complete non-sequitur, a product of your feverish mind.

> if you want valid values, this is something you can't enforce on c structs
Yes you can, you absolute degenerate, but it's still a complete non-sequitur. You are literally unable to comprehend posts and produce responses that are in any way related to them.
>>
>>61011906
>That's right. I didn't say this. It's a another complete non-sequitur, a product of your feverish mind.

>>61005124
>It should be impossible to take just any random procedural C program and mechanically transform its structs into objects in a meaningful sense.

So, you don't want a meaningful representation of a struct in the proposed object system, you're proposing that anything short of a full AI that understands the intentions of the code and generates well behaving message-based objects with strict data validation will fail to meet your standards.

Whelp, I'm out. You enjoy your miserable existence whining about stupid shit and thinking you have a point.

> being you and not killing yourself immediately
>>
>>61011906
maybe if you explained yourself better you'd get more productive discussion
>>
File: just-fucking-kill-me.jpg (58KB, 500x332px) Image search: [Google]
just-fucking-kill-me.jpg
58KB, 500x332px
>>61011997
>more bizarre non-sequiturs
Every post of yours indicates a total lack of understanding and general brain damage. I hope you get better. Needless to say, you get NO bonus points.
>>
>>61012004
>maybe if you explained yourself better you'd get more productive discussion
Well, what part of OP is unclear? It's plain and simple English.
>>
>>61012054
nope
>>
>>61012062
Right. Because it's not unclear in any way. You're just retarded.
>>
>>61012146
>It should be impossible to take just any random procedural C program and mechanically transform its structs into objects in a meaningful sense.

well what does "meaningful sense" mean, for starters? That's rather vague.
>>
>>61012236
>"meaningful sense"
>X is Y in a meaningful sense
>you can draw additional useful conclusions about X based on the fact that it is a Y
>>
>>61012340
clear as mud
>>
>>61012470
Again, just a symptom of your retardation. There's nothing controversial about the phrase "in a meaningful sense". Ultimately the requirement is that if it were at all possible to take a random C struct and mechanically transform it into code that produces things that superficially qualify as "objects" by your definition, you should at least be able to argue why they don't make good objects based on your own definition. How hard could it be for you brainlets to grasp?
>>
>>61012537
sounds more like you mean in a "rigorous" sense, ironically.

What is meaningful?
>>
>>61012537
nobody said c objects aren't "good" (again, whatever that means), but that the syntax just isn't set up to handle oop out of the box, of course you could have just put that in your OP instead of dancing around what your actual question was
>>
>>61012558
>sounds more like you mean in a "rigorous" sense, ironically
For something to rigorously adhere to a definition, there needs to be a rigorous definition first. To expect rigorous definitions from posters on this board would be mad, so I settled for "meaningful" in case someone provides a definition that is imperfect, and then something technically qualifies for it while it's fairly obvious what the real intent was. Basically, I was trying to ease the burden of proof of anyone attempting it.
>>
File: topmost-kek.jpg (45KB, 493x461px) Image search: [Google]
topmost-kek.jpg
45KB, 493x461px
>>61012590
>of course you could have just put that in your OP instead of dancing around what your actual question was
But you literally didn't understand the question again, because your response is a non-sequitur. You must be fucking with me now...
>>
>>61012690

but your definition of meaningful that you gave is actually what rigour is for.
>>
>>61012728
The point is that one could still explain why you can't actually draw any useful conclusions about X based on it being a Y according to an imperfect definition.
>>
>>61012751
I was giving people some wiggle-room, for the sake of fairness. For fuck's sake, why is this worth arguing about?
>>
>>61012775
you don't know what you're talking about
>>
>>61012751
yes, that is rigour.
>>
>>61012794
No, you don't know what I'm talking about because you are a literal, unironic retard. Scratch "meaningful sense". Do it rigorously. Can you?
>>
>>61012816
no, because there's no logic behind your question.
>>
>>61012809
> that is rigour.
No, that is not rigor. Rigor implies that a rigorous definition has been provided, and anything that qualifies under it qualifies under it and it's not up for any discussion.
>>
>>61012834
There is no logic behind your continued existence. You're not even trolling at this point. You are just being smug because you don't understand that you're displaying absolute mental inferiority every time you post. Go be dumb somewhere else now. <3
>>
Uh, you're just asking for something that doesn't exist? The Linux kernel uses "objects", there's no reason you can't use structs as objects in C.

The word you're missing is oriented- object oriented languages are built around objects, and have interfaces and features made for them
>>
>>61012838
that's what I'm saying...
>>
>>61012869
>you're just asking for something that doesn't exist
So you can't do it either. Very well. As I said multiple times in this thread, if it really is impossible (which I disagree with) that only further delegitimizes OOP.
>>
>>61005124
can you define an simple to use interface and inject the correct implementation depending on the context in C? I THOUGHT NOT.
>>
>>61012887
>look at how retarded i am, uncle anon
That's... umm... nice, kid.
>>
>>61012901
You CAN implement objects in C, I'm telling you that there's nothing special about objects themselves, they are commonly used in C. Plenty of people have defined them, I can just copy/paste their answers- but they can all be done in C, why do you think that should be impossible? Everything that isn't C is syntactic sugar and libraries, and that's fine
>>
>>61012904
>i did not understand the question
Feel free to read it again.
>>
Thank god Steve Jobs invented iterative programming languages to offer an alternative to all this OOP memery
>>
>>61012904
why can't you do this in C? curious...

You are talking about dependency injection, right?
>>
>>61012938
>You CAN implement objects in C
You did not understand the question. Whether you can "implement objects in C" or not is irrelevant. The point of the C struct test is to show that it is, in general, impossible to convert random C structs into code that produces things that would qualify as objects per your definition.
>>
>>61013008
impossible to mechanically convert*
>>
>>61013008
whose definition of objects are you talking about? An object is just an instance of something.
>>
>>61013008
Half the time people use struts they ARE using them as objects, why would I try to disprove the truth? It's an obvious concept most clever people will independently come up with
>>
File: 1496010495694.png (136KB, 363x296px) Image search: [Google]
1496010495694.png
136KB, 363x296px
>>61013031
>please notice me, senpai
No.
>>
>>61013035
Okay. I'm filing your response under "I can't do it and I don't see a problem with it", just like almost every other response in this thread. Thanks for the participation.
>>
>>61005124
C struct test is impossible. Any object can be turned into a C struct.
>>
>>61013046
man you're stubborn. What definition are you talking about? You opened the thread asking for one and you still have neither provided one nor agreed with any given so far... so what is it?
>>
>>61013061
> Any object can be turned into a C struct.
You did not understand the question. Read it again.
>>
File: shitposting.gif (15KB, 250x250px) Image search: [Google]
shitposting.gif
15KB, 250x250px
>>61013063
>p...please notice me senpai
>look at me trowlen
No.
>>
>>61013060
Fine, if you're so smart quit begging the question and let's hear your definition that passes the test and everything
>>
>>61013060
I can't do the impossible, you are right, structs are often used as objects. You just seem to think something is wrong with that, but there's not anything wrong with that. I don't know why you think objects should be special
>>
>>61013094
again, it's your thread, what's your endgame?
>>
>>61013102
>begging the question
You don't understand what this phrase means.

>let's hear your definition
Why do I need to provide one for you? What does my ability or inability to do so prove?
>>
>>61013060
>>61013107
Seriously why would they be magic? They are structs that people use a specific way, the structure of program determines wether a struct is an object or not, not the struct. They are not magic, and you want someone to explain how they're magic
>>
>>61013107
>structs are often used as objects. You just seem to think something is wrong with that
The ability to use structs to implement objects is in no way a problem in and of itself. You just didn't understand the question, nor my explanation of it.
>>
>>61013138
yes I do, you've already assumed a correct definition of an Object can't pass your test without giving any reason why that is, so...

>Why do I need to provide one for you? What does my ability or inability to do so prove?
Because otherwise you're begging the question
>>
>>61013126
> it's your thread, what's your endgame?
My endgame is to gather genuine responses from OOP programmers to various questions about OOP. Whether you think my questions are pointless or not doesn't really matter.
>>
>>61013176
sorry, one that does pass your test.
>>
>>61013162
Your question is invalid, that definition cannot be fulfilled because objects will never "pass" your test. Objects fail your test, any valid definition will. The problem is you think this is a problem, but it's not, object oriented programming is a style of programming that fails your"test"
>>
>>61013203
well then what's the point of your test?
>>
File: tired-pepe.jpg (11KB, 251x242px) Image search: [Google]
tired-pepe.jpg
11KB, 251x242px
>>61013176
>>61013204
>nooooticeee meeee
>i'ma trooooowlen
>>
>>61013216
>Your question is invalid,
Opinion discarded.

> that definition cannot be fulfilled because objects will never "pass" your test
Thank you for your input. Filed under "I can't do it".
>>
>>61013219
no, you misunderstood my post, please read it again :)
>>
>>61013238
You can't do it either, what's your point?
>>
>>61013258
>You can't do it either
I can, but it wouldn't matter if I couldn't.

>what's your point?
Read the thread. Not doing it again. Just gathering responses now.
>>
>>61013238
If I defined something that passed your test it would no longer be an object. C++ and Python are not object oriented under your test. Nothing is.

So sure: here's my definition of objects: objects are an ordinary organic pineapple. There is no way to transform C structs into an ordinary organic pineapple.
>>
Yes, it's this post again.
Can any of you OOP experts define what an object is?
For bonus points, I challenge you to provide a definition that passes the machine code test:
It should be impossible to take just any random machine code program and mechanically transform its data into objects in a meaningful sense.
If you think your definition passes the machine code test, you must prove it relying only on your original definition (no ad hoc excuses and modifications).
>>
File: FSSA60010--2T.jpg (23KB, 227x205px) Image search: [Google]
FSSA60010--2T.jpg
23KB, 227x205px
>>61013238
>>61013281
Pic related, a valid and passing response to your question with bonus points
>>
>>61013281
>If I defined something that passed your test it would no longer be an object
Okay, dude. I got you. No need to reiterate. Filing under "I can't do it".
>>
>>61013317
Uh I literally passed your test with bonus points. Objects are an ordinary organic pineapple
>>
>>61013302
>missing the point and shitposting
Not sure if I should file this under "I can't do it", because you're not even trying.
>>
>>61013323
>Uh I literally passed your test with bonus points. Objects are an ordinary organic pineapple
You actually did. Congratulations. This will be duly noted as the best the OOP crowd could do. Literally.
>>
>>61013280
it wouldn't matter if you didn't continue to assert you could without actually demonstrating it, but alas.
>>
>>61013345
Well mind you that no normal OOP programers can apply here- Python and C++ and other existing object oriented languages do fail your test. I'm a new breed of OOP, with a new kind of object. An organic pineapple. Perhaps someone better than me could create a language with a better object that passes, but as of right now, it's just that. I'm the only object oriented programmer.
>>
>>61013378
>it wouldn't matter if you didn't continue to assert you could without actually demonstrating it

But I already have, anon-chan. Any object definition that includes this property would pass:
>the validity of its state must depend only on the correctness of its message processing code
>>
File: posted-it-again.jpg (84KB, 533x700px) Image search: [Google]
posted-it-again.jpg
84KB, 533x700px
>>61013382
Good job, anon. Your answer is valid. Organic pineapples literally pass the C struct test. What else do you want me to say?
>>
>>61013443
Well for one admit that no existing definition of object before mine could ever pass your test, that no existing object oriented language could pass your test, and that your question was an open ended waste of time only created to get people to argue over the impossible. Also that you eat dirt.
>>
>>61013420
that's not a definition, that's a feature you would like the definition to have, and I already said you can accomplish this in most OOP languages with setter logic...
>>
>>61013474
>no existing definition of object before mine could ever pass your test
False.

>no existing object oriented language could pass your test
If this were true, it would be very bad for the OOP crowd.

>an open ended waste of time
Not at all. Your failures were duly noted and will be used against you. Just not in this thread.
>>
>>61013443
well what is it exactly you're trying to say?
>>
>>61013516
>If this were true, it would be very bad for the OOP crowd.

Why?
>>
>>61013527
>what is it exactly you're trying to say
That he's done his best (in fact, he's done better than everyone else, and this is not the only place or the only time where I started this thread) and he can move on now. Make what you want of this fact.
>>
>>61013516
>>>61013474 (You)
>>no existing definition of object before mine could ever pass your test
>False.

Prove it.
>>no existing object oriented language could pass your test
>If this were true, it would be very bad for the OOP crowd.

It is true, and it's not bad for OOP because your question is an open ended waste of time.
>>an open ended waste of time
>Not at all. Your failures were duly noted and will be used against you. Just not in this thread.

It is, if it wasn't an organic pineapple would not pass. It's a flawed, open ended question that can define everything EXCEPT objects
>>
>>61013553
what is wrong w/ you?
>>
>>61013548
>Why?
Because it would mean that qualifying as an object doesn't mean anything beyond what it means to qualify as a struct with associated functions.
>>
>>61013557
>Prove it.
Read the thread.

>and it's not bad for OOP
Nice subjective opinion.

>if it wasn't an organic pineapple would not pass
False.

>It's a flawed, open ended question that can define everything EXCEPT objects
Opinion discarded.
>>
>>61013653
Literally anything but objects pass your test. Structs pass your test (can't define a struct using structs), functions, operators, S-expressions. They all pass with bonus points. Anyone who isn't a moron can see that it's completely open ended and designed to only exclude objects to get people to argue. Well guess what I'm gonna argue, about your test that's clearly an elaborate troll
>>
>>61013707
>repeating the same fallacy over and over
>failing to understand the question
Look, I get it. You can't do it, and you are desperately trying to convince yourself that it's not a bad thing. But can't you... like... go do it somewhere else?
>>
>>61013729
I am staying right here and making sure that everyone knows that your test is just designed to create argument and can never be passed with anything that calls itself an object. This is your thread now, and this is your thread every time I see it from now on.
>>
>>61013629
There's nothing wrong with this though oop languages also have explicit notions of member privacy. Also you mean class here, not object.
>>
>>61013756
>There's nothing wrong with this
Keep telling that to yourself.

>Also you mean class here, not object.
No, I just mean instances of a struct.
>>
>>61013785
>Keep telling that to yourself.
Well what's wrong with out then?

>No, I just mean instances of a struct
No you dont
>>
>>61013833
>Well what's wrong with out then?
If anything can be mindlessly made into an object, then being an object has no intrinsic value. The tenets and principles of OOP (except for the anti-feature of inheritance), taken in their general sense, have nothing to do with OOP, and their object-specific variations have no intrinsic value (due to the fact that structuring something in terms of objects has no intrinsic value). OOP is a non-paradigm. That's the outline. I'm not going to provide a full detailed proof here.
>>
>>61013923
If you're going to try to sound smart at least use the terminology correctly. Nobody said you couldn't do OOP in c, c++ just has syntax improvements dedicated to it. Also how do you do member privacy in C?
>>
>>61013923
also why is inheritance an "anti-feature"?
>>
>>61013998
>another retaraded non-sequitur
It's okay. I didn't expect you to understand anything I said. You are an OOP monkey, after all. Thank you for your input.
>>
>>61014076
That's not a non-sequiter, you fucking idiot. When you said object in that sentence you clearly meant class.
>>
>>61014092
It's okay. I didn't expect you to understand anything I said. You are an OOP monkey, after all. Thank you for your input.
>>
>>61014105
you are a funny guy.
>>
>>61008050
>sugar

get the fuck out
>>
>>61014135
please tell me you're being ironic
>>
Is this some next-level-faggotry thread?
OP asks a question that needs to be answered correct in a way that OP sees it as correct (because he is like david ike and thinks he knows the truth), just to write that answer down in some exam, which he/she will fail and then blame /g/ for it.
You freaking mongoloid, if you want an answer we also need to know which programminglanguage we are talking about. An object is not the same in every fucking language. The best example for this shit is javascript.
>>61005657
>>61005754
these two should be enough, now go forth. There, there: <3
>>
>>61014126
>>61014135
>>61014145
At this point I wouldn't be surprised if you're the same autist samefagging repeatedly.
>>
>>61014174
>fails to understand and address the question
Truly, a shocker.
>>
>>61014145
Not the same anon but """syntax sugar""" is fucking annoying. It means nothing and your opinion is discarded when used.
>>
>>61014214
>It means nothing
Opinion discarded. Because it means nothing.
Thread posts: 237
Thread images: 23


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.