Quantcast
[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Maintenance is complete! We got more disk space.
Become a Patron!

/g/ - Technology


View post   

[ Toggle deleted replies ]
File: 190 KB, 1280x1233, robot.jpg [View same] [iqdb] [saucenao] [google] [report]
61005124 No.61005124 [Reply] [Original] [archived.moe] [rbt]

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.61005382

No takers?

>> No.61005657

An entity that provides a set of functions that operate within the context of its lexically scoped data.

>> No.61005718

>>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.

>> No.61005754
File: 1.61 MB, 500x491, 1498010911424.gif [View same] [iqdb] [saucenao] [google] [report]
61005754

>>61005124
Traditionally, it's an instantiation of a class. Some languages are different. Getters and Setters do not break encapsulation. Love you.

>> No.61005775

>>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.

>> No.61005784

>>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

>> No.61005803

>>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.

>> No.61005811

>>61005124
An object is an instance of a class.

>> No.61005821

>>61005811
>An object is an instance of a class.
So Javascript and Self objects aren't objects to you?

>> No.61005828

>>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 :)

>> No.61005842
File: 30 KB, 612x491, 1493598525859.jpg [View same] [iqdb] [saucenao] [google] [report]
61005842

>>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

>> No.61005886

>>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.

>> No.61005897

>>61005842
>why
Because a definition that doesn't pass the C struct test isn't particularly interesting to me.

>> No.61005913

>>61005897
you can do oop in c tho

>> No.61005940
File: 322 KB, 411x563, 2588.png [View same] [iqdb] [saucenao] [google] [report]
61005940

>>61005886
Sure. But seriously, an object in its purest sense is literally just an instantiation of something.

>> No.61005992

>>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.

>> No.61006022

>>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.

>> No.61006041

>>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.

>> No.61006051

>>61005124

a thing, person, or matter to which thought or action is directed.

>> No.61006052

>>61006041
Dude what the fuck it's just a way to structure and think about your code

>> No.61006087

>>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.

>> No.61006096

>>61005124
your c struct test is bullshit and you are a lame troll

>> No.61006104
File: 250 KB, 740x557, autistic-apu.png [View same] [iqdb] [saucenao] [google] [report]
61006104

>>61006096
>your c struct test is bullshit
Why is it "bullshit" and why are you getting all angry?

>> No.61006106

>>61006087
that is what it is you fucking moron.

>> No.61006119

>>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.

>> No.61006165

>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).

>> No.61006187

>>61006165
>managing to miss the point so perfectly

>> No.61006230

>>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.

>> No.61006232

>>61006187
Irony

>> No.61006247
File: 4 KB, 200x200, 1476540933228.jpg [View same] [iqdb] [saucenao] [google] [report]
61006247

>>61006232
Don't use words that you don't understand. It's embarrassing.

>> No.61006261

>>61005124
Its a struct with functions defined inside, so you cant use them outside the object.

>> No.61006286

>>61006247
It's a meme you dip

>> No.61007268

Still no takers?

>> No.61007327

>>61006230
Oh my how insightful! We have found a strange loop in the matrix! Abort abort!

>> No.61007352

>>61006187
Please explain the point.

>> No.61007389

>>61007327
It's not my fault that there's no insight to be gained from your shitpost.

>> No.61007406
File: 26 KB, 396x400, le meemee toad.png [View same] [iqdb] [saucenao] [google] [report]
61007406

>>61005124
An object is an instance of a class.

A class is just a data structure with its own methods.

>> No.61007580

>>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.

>> No.61007643

>>61007580
Lets see you implement private functions in c then :)

>> No.61007665

>>61007643
Let's see you provide a definition first.

>> No.61007883

>>61007665
lol

>> No.61007909

>>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.

>> No.61007955

>>61007909
>It's trivial to implement "private functions" in C

can you do it in a non kludgy way?

>> No.61007961

>>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.

>> No.61008001

>>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.

>> No.61008028

>>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.

>> No.61008034
File: 73 KB, 205x274, 1495568873544.gif [View same] [iqdb] [saucenao] [google] [report]
61008034

>>61008001
In a way that's easier or at least as easy as how it's handled in, say, seppels or even Java

>> No.61008050

>>61008034
This is completely irrelevant as I've already explained. I'm discussing concepts while you're discussing syntax sugar.

>> No.61008062

>>61008028
lets hear it :)

>> No.61008082

>>61008050
I tried to give a conceptual definition earlier but you called it "unclear". What exactly do you want?

>> No.61008091

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.

>> No.61008113

>>61008082
I'm not sure which conceptual definition you're referring to. Put a reference to it in your next post.

>> No.61008126

>>61008113
no

>> No.61008145

>>61008091
Fuck me, the Java part has the method missing. But, at least you get the point.

>> No.61008175

>>61008145
>But, at least you get the point.
I assume your point was that Java objects are glorified structs?

>> No.61008217

>>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.

>> No.61008222

>>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.

>> No.61008234

>>61008222
fuck, I meant that objects are structs with the ability to have a function/method inside.

>> No.61008248

>>61008234
TOO LATE FAGGOT

>> No.61008258

>>61008217
>conveniences
That's another argument about syntax. It misses the point of the thread.

>> No.61008270
File: 116 KB, 536x640, wtf-did-i-just-read.jpg [View same] [iqdb] [saucenao] [google] [report]
61008270

>>61008248
You really like to shitpost in my threads, don't you? Did I hurt your feelings yesterday or something?

>> No.61008280

>>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

>> No.61008462

>>61005124
Do we need to treat a collection of structs as the object?

>> No.61008487

>>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

>> No.61008506

>>61008462
>Do we need to treat a collection of structs as the object?
Not sure what you mean by this.

>> No.61008545

>>61008487
>I actually have elaborated multiple times how it's relevant:

really? where?

>> No.61008707

>>61008487
>how it's relevant

Yes. It's ir-

>> No.61008732
File: 70 KB, 488x393, (you).jpg [View same] [iqdb] [saucenao] [google] [report]
61008732

>>61008545
>>61008707
Whatever helps you sleep at night. Go shitpost somewhere else.

>> No.61008814

>>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.

>> No.61008815

>>61008732
you're cute :)

>> No.61008873
File: 40 KB, 500x491, 1480903561397.jpg [View same] [iqdb] [saucenao] [google] [report]
61008873

>>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.

>> No.61008887

>>61008873
tenets*

>> No.61009020

>>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

>> No.61009033

>>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.

>> No.61009103

>>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.

>> No.61009139

>>61009103
ur helpless

>> No.61009161

>>61009103
>Yes you can.

Prove it, or go choke on a bag of dicks and autism.

>> No.61009164

>>61009139
Not my fault that you're too dumb to understand and address the OP.

>> No.61009220

>>61009164

>>61008814
>> claim magic knowledge and refuse to share it
>> victory

>> No.61009262

>>61008091
Wrong, the reference variable acts like a pointer TO the object, the object is just a simple object living in the heap.

>> No.61009291

pOOP fags on sucide watch

>> No.61009309

>>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.

>> No.61009347

>>61009309
Throw an exception handler into a setter, boom

>> No.61009368

people aren't allowed to define words using terms the OP doesn't know: The Thread

>> No.61009401

>>61005124
Object is a struct + vtable + RTTI.

>> No.61009408

>>61009347
I think you mistakenly posted in the wrong thread because your response is a non-sequitur to literally everything in this one.

>> No.61009409

>>61009309
>define an object!
>I'm not gonna do it myself that would be irrelevant

Are you for real?

>> No.61009445

>>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

>> No.61009455

>>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.

>> No.61009479

>>61009445
Again, a complete non-sequitur. Very low IQ people in this thread. Sad!

>> No.61009484

>>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.

>> No.61009517

>>61009455
Whatever, fag

>> No.61009530

>>61009484
He's an idiot don't worry about it

>> No.61009541

>>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.

>> No.61009553

>>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.

>> No.61009575

>>61009553
Your test doesn't make any sense

>> No.61009657

>>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?

>> No.61009675

>>61009657
How it's relevant to anything

>> No.61009703

>>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.

>> No.61009733

>>61009703
Hey, it's your thread

>> No.61009772

>responding to this thread
what the fuck are you doing

>> No.61009854

>>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.

>> No.61009873

>>61009854
an actual definition that meets the challenge*

>> No.61009882

>>61009854
ok

>> No.61010045

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.

>> No.61010064

>>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

>> No.61010128
File: 58 KB, 372x450, (you)-.jpg [View same] [iqdb] [saucenao] [google] [report]
61010128

>>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.

>> No.61010155
File: 80 KB, 640x640, get-well-soon.jpg [View same] [iqdb] [saucenao] [google] [report]
61010155

>>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.

>> No.61010250

>>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

>> No.61010276

>>61010250
>an automatically generated setter magically understands the semantics of the object
I'm sorry, but you are mentally retarded. Shoo.

>> No.61010318

>>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...

>> No.61010370

>>61005754
>Traditionally, it's an instantiation of a class.

False, you can have objects without classes.

>> No.61010421

>>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.

>> No.61010474
File: 6 KB, 139x150, tfw-this-shit-again.jpg [View same] [iqdb] [saucenao] [google] [report]
61010474

>>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.

>> No.61010486

>>61010370
that's why I said traditionally. This doesn't include Javascript for example where everything is an object

>> No.61010499

>>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.

>> No.61010509

>>61010474
enlighten me

>> No.61010524

>>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

>> No.61010546

>>61010509
Go back and try to actually follow the exchange, or just shoot yourself outright, you waste of web space.

>> No.61010574

>>61010546
so, you're just shitposting, got it.

I already told you how traditional OOP covers your special definition of internal correctness.

>> No.61010588

>>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.

>> No.61010627

>>61010588
>utterly fails to address the challenge
>assumes i don't know how vtables work

>> No.61010647

>>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.

>> No.61010661

>>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.

>> No.61010680

>>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.

>> No.61010722

>>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.

>> No.61010768

>>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.

>> No.61010794

>>61010768
>That's because you're a brainless
or maybe you have no idea what you're talking about :)

>> No.61010886
File: 9 KB, 298x379, smug-retard-2.jpg [View same] [iqdb] [saucenao] [google] [report]
61010886

>>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.

>> No.61010919

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

>> No.61011085

>>61010919
>another retard who can't address the question in any way
I hope sperging out helps with you deal with your impotence.

>> No.61011236

>Everyone Comes to the Freak Show
/thread
https://www.youtube.com/watch?v=l0f31ggcSis

>> No.61011634
File: 17 KB, 246x374, mfw-you-exist.jpg [View same] [iqdb] [saucenao] [google] [report]
61011634

>the sheer number of posters in this thread who confuse translating a class into a struct with translating a struct into a class

>> No.61011706

>>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

>> No.61011732

>>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.

>> No.61011891

>>61006286
Irony

>> No.61011906

>>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.

>> No.61011997

>>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

>> No.61012004

>>61011906
maybe if you explained yourself better you'd get more productive discussion

>> No.61012036
File: 58 KB, 500x332, just-fucking-kill-me.jpg [View same] [iqdb] [saucenao] [google] [report]
61012036

>>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.

>> No.61012054

>>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.

>> No.61012062

>>61012054
nope

>> No.61012146

>>61012062
Right. Because it's not unclear in any way. You're just retarded.

>> No.61012236

>>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.

>> No.61012340

>>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

>> No.61012470

>>61012340
clear as mud

>> No.61012537

>>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?

>> No.61012558

>>61012537
sounds more like you mean in a "rigorous" sense, ironically.

What is meaningful?

>> No.61012590

>>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

>> No.61012690

>>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.

>> No.61012710
File: 45 KB, 493x461, topmost-kek.jpg [View same] [iqdb] [saucenao] [google] [report]
61012710

>>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...

>> No.61012728

>>61012690

but your definition of meaningful that you gave is actually what rigour is for.

>> No.61012751

>>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.

>> No.61012775

>>61012751
I was giving people some wiggle-room, for the sake of fairness. For fuck's sake, why is this worth arguing about?

>> No.61012794

>>61012775
you don't know what you're talking about

>> No.61012809

>>61012751
yes, that is rigour.

>> No.61012816

>>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?

>> No.61012834

>>61012816
no, because there's no logic behind your question.

>> No.61012838

>>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.

>> No.61012856

>>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

>> No.61012869

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

>> No.61012887

>>61012838
that's what I'm saying...

>> No.61012901

>>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.

>> No.61012904

>>61005124
can you define an simple to use interface and inject the correct implementation depending on the context in C? I THOUGHT NOT.

>> No.61012921

>>61012887
>look at how retarded i am, uncle anon
That's... umm... nice, kid.

>> No.61012938

>>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

>> No.61012944

>>61012904
>i did not understand the question
Feel free to read it again.

>> No.61012971

Thank god Steve Jobs invented iterative programming languages to offer an alternative to all this OOP memery

>> No.61012996

>>61012904
why can't you do this in C? curious...

You are talking about dependency injection, right?

>> No.61013008

>>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.

>> No.61013024

>>61013008
impossible to mechanically convert*

>> No.61013031

>>61013008
whose definition of objects are you talking about? An object is just an instance of something.

>> No.61013035

>>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

>> No.61013046
File: 136 KB, 363x296, 1496010495694.png [View same] [iqdb] [saucenao] [google] [report]
61013046

>>61013031
>please notice me, senpai
No.

>> No.61013060

>>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.

>> No.61013061

>>61005124
C struct test is impossible. Any object can be turned into a C struct.

>> No.61013063

>>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?

>> No.61013073

>>61013061
> Any object can be turned into a C struct.
You did not understand the question. Read it again.

>> No.61013094
File: 15 KB, 250x250, shitposting.gif [View same] [iqdb] [saucenao] [google] [report]
61013094

>>61013063
>p...please notice me senpai
>look at me trowlen
No.

>> No.61013102

>>61013060
Fine, if you're so smart quit begging the question and let's hear your definition that passes the test and everything

>> No.61013107

>>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

>> No.61013126

>>61013094
again, it's your thread, what's your endgame?

>> No.61013138

>>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?

>> No.61013144

>>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

>> No.61013162

>>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.

>> No.61013176

>>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

>> No.61013203

>>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.

>> No.61013204

>>61013176
sorry, one that does pass your test.

>> No.61013216

>>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"

>> No.61013218

>>61013203
well then what's the point of your test?

>> No.61013219
File: 11 KB, 251x242, tired-pepe.jpg [View same] [iqdb] [saucenao] [google] [report]
61013219

>>61013176
>>61013204
>nooooticeee meeee
>i'ma trooooowlen

>> No.61013238

>>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".

>> No.61013245

>>61013219
no, you misunderstood my post, please read it again :)

>> No.61013258

>>61013238
You can't do it either, what's your point?

>> No.61013280

>>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.

>> No.61013281

>>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.

>> No.61013302

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).

>> No.61013315
File: 23 KB, 227x205, FSSA60010--2T.jpg [View same] [iqdb] [saucenao] [google] [report]
61013315

>>61013238
>>61013281
Pic related, a valid and passing response to your question with bonus points

>> No.61013317

>>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".

>> No.61013323

>>61013317
Uh I literally passed your test with bonus points. Objects are an ordinary organic pineapple

>> No.61013330

>>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.

>> No.61013345

>>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.

>> No.61013378

>>61013280
it wouldn't matter if you didn't continue to assert you could without actually demonstrating it, but alas.

>> No.61013382

>>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.

>> No.61013420

>>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

>> No.61013443
File: 84 KB, 533x700, posted-it-again.jpg [View same] [iqdb] [saucenao] [google] [report]
61013443

>>61013382
Good job, anon. Your answer is valid. Organic pineapples literally pass the C struct test. What else do you want me to say?

>> No.61013474

>>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.

>> No.61013485

>>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...

>> No.61013516

>>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.

>> No.61013527

>>61013443
well what is it exactly you're trying to say?

>> No.61013548

>>61013516
>If this were true, it would be very bad for the OOP crowd.

Why?

>> No.61013553

>>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.

>> No.61013557

>>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

>> No.61013577

>>61013553
what is wrong w/ you?

>> No.61013629

>>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.

>> No.61013653

>>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.

>> No.61013707

>>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

>> No.61013729

>>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?

>> No.61013750

>>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.

>> No.61013756

>>61013629
There's nothing wrong with this though oop languages also have explicit notions of member privacy. Also you mean class here, not object.

>> No.61013785

>>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.

>> No.61013833

>>61013785
>Keep telling that to yourself.
Well what's wrong with out then?

>No, I just mean instances of a struct
No you dont

>> No.61013923

>>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.

>> No.61013998

>>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?

>> No.61014074

>>61013923
also why is inheritance an "anti-feature"?

>> No.61014076

>>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.

>> No.61014092

>>61014076
That's not a non-sequiter, you fucking idiot. When you said object in that sentence you clearly meant class.

>> No.61014105

>>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.

>> No.61014126

>>61014105
you are a funny guy.

>> No.61014135

>>61008050
>sugar

get the fuck out

>> No.61014145

>>61014135
please tell me you're being ironic

>> No.61014174

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

>> No.61014193

>>61014126
>>61014135
>>61014145
At this point I wouldn't be surprised if you're the same autist samefagging repeatedly.

>> No.61014209

>>61014174
>fails to understand and address the question
Truly, a shocker.

>> No.61014214

>>61014145
Not the same anon but """syntax sugar""" is fucking annoying. It means nothing and your opinion is discarded when used.

>> No.61014318

>>61014214
>It means nothing
Opinion discarded. Because it means nothing.

>>
Name (leave empty)
Comment (leave empty)
Name
E-mail
Subject
Comment
Password [?]Password used for file deletion.
reCAPTCHA
Action