Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 18:50

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Learn the C with Shodan

Discussion on Learn the C with Shodan within the C/C++ forum part of the Coders Den category.

Reply
 
Old 09/11/2017, 00:33   #16
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,137
Received Thanks: 573
Quote:
Originally Posted by algernong View Post
I'm writing from the following stance: OOP (or programming paradigms in general) isn't about syntax or language features, but how we organize and design code.

This stance seems to be right:






With this in mind, object oriented code is independent from the language it is written in. OOP languages like Java offer syntactical sugar to explicitly support the OO paradigm. This, however, doesn't mean that every Java code is object oriented.

Oder explizit nochmal:

Das ist doch quasi die Definition von Syntax Zucker und hat nichts mit irgendwelchen Paradigmen zu tun. Zuerst kommt das Paradigma, dann die Sprache, mit der man das komfortabler anwenden kann.
Well I like to stick to standards, like the ISO/IEC-2382-15-Standard:
Quote:
Pertaining to a technique or a programming language that supports objects, classes, and inheritance.
Or like Alan Kay, (about the inventor of OOP) categorized it:
Quote:
1. Everything is an object
2. Objects communicate by sending and receiving messages (in terms of objects),
3. Objects have their own memory (in terms of objects)
4. Every object is an instance of a class (which must be an object)
5. The class holds the shared behavior for its instances (in the form of objects in a program list)
6. To eval a program list, control is passed to the first object and the remainder is treated as its message
These two definitions differ a little bit, as the first one is a technical one to define what a language must have to be called OOP, while the second defines the style of writing code like you wrote.
And neither of these definitions can fit to C.
warfley is offline  
Old 09/11/2017, 01:24   #17
 
elite*gold: 0
Join Date: May 2015
Posts: 700
Received Thanks: 444
The ISO definitions seems to be irrelevant since it only defines what a language needs to be called "OOP language"; I didn't claim C to be an OOP language by definition but that you can write object oriented code with it (i.e. code that is in line with the paradigm) and that it is practical to do so.

The second quote seems to be a definition of the paradigm, right? So it's about code itself, not the language and doesn't contract my stance as far as I see it. Your code example seems to be in line with this definition.
algernong is offline  
Old 09/11/2017, 01:40   #18
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,137
Received Thanks: 573
Quote:
Originally Posted by algernong View Post
The ISO definitions seems to be irrelevant since it only defines what a language needs to be called "OOP language"; I didn't claim C to be an OOP language by definition but that you can write object oriented code with it (i.e. code that is in line with the paradigm) and that it is practical to do so.

The second quote seems to be a definition of the paradigm, right? So it's about code itself, not the language and doesn't contract my stance as far as I see it. Your code example seems to be in line with this definition.
Well the points 4 and 5:
Quote:
4. Every object is an instance of a class (which must be an object)
5. The class holds the shared behavior for its instances (in the form of objects in a program list)
First of all, there is nothing in C that can nearly count as a class, which is a object itself to interact, and secondly there is no code bound to the class (as there is no class). The functions for structs are just simple functions, can be called from wherever, with whatever parameters.

So this is basically completely missing, and this is the most important part of OOP.

My main problem with calling this OOP is, that this would make the term procedural programming redundant, as with this, strict procedural programming (which also requires the encapsulation of state based code into procedures, while the state is a dataset) would cover exactly the same within C. Therefore im finding it pretty hard to say, lets say we also have classes in C (except for there is no real definition what this might look like) and call it OOP.

Or to put it in another light, if you are using C++, and mix this style with real OOP, how do you discriminate, because compared to C++ classes calling both OOP is not really helpful
warfley is offline  
Reply


Similar Threads Similar Threads
[Selling] learn 2 learn (Kurs)
08/24/2015 - Trading - 1 Replies
Hey, da in vielen Teilen Deutschlands langsam wieder die Schulzeit beginnt (und ich das heute erfahren durfte), damit auch die Lernezeit wieder beginnt, wollte ich euch folgendes Vorstellen. Und zwar ist das Lernen heute überall notwendig. Vom Leben als Schüler, zum Auszubildenden oder Studenten, bis hin zum Beruf -überall muss gerlernt werden. Meistens ist es aber dann so, dass es schwer ist, die ganzen Infos in seinen Schädel zu bekommen. Dafür ist dieser Kurs. Ich bin...
How to use/work with shodan ?
07/24/2015 - Off Topic - 4 Replies
Hallo epvp, Ich bin mir nicht sicher in welchem Forum genau ich diese Frage nun stellen sollte, deshalb mach ich es einfach mal hier. Und zwar wollte ich fragen, ob mir jemand erklären kann wie ich mit shodan arbeiten kann, sprich Kameras etc. finden und "hacken". Wäre lieb wenn ihr mich auf Skype adden könntet und mir das dort erklären könntet. Skype: der.bozz66 MfG -_-BoZz-_-



All times are GMT +1. The time now is 18:50.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.