|
Is there a way to write OO-like code in the C programming language?
See also:
http://stackoverflow.com/questions/351733/can-you-write-object-oriented-code-in-c http://stackoverflow.com/questions/415452/object-orientation-in-c Found by searching on "[c...
Started by mixedpickles on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
I) { (this->SomeFunction)(this, i); }
The file functions fopen, fclose, fread are examples of OO code read !
Here's the uncached version of the macro that sends messages to objects:
typedef struct.
|
|
Besides the general, "What is OO?" question, I want to understand how one transitions from a procedural-based programmer to someone who gets OO .
I'm anticipating the winning answer would contain thoughts on SOLID, as well as some practices/drills for...
Started by Brett Veenstra on
, 28 posts
by 26 people.
Answer Snippets (Read the full thread at stackoverflow):
I learned OO from lots of really boring it until I started to code OO ....
The pacing & reinforcement of this book really helped me to get a better handle on a lot of the abstract & organizational logic .
The purpose of OO completely.
|
|
It appears that most of our SAP programmers are using the old version of ABAP, the one before object-oriented stuff. I also noticed that the language is much cleaner and more modern with OO (they apparently took the opportunity to get rid of deprecated...
Started by ilya n. on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If they want to "OO", there may be ....
OO ABAP and procedural ABAP work.
SAP hasn't even done just read up on OO ABAP and start writing new programs with it.
Environment, you're never going to get everything re-written in OO.
|
Ask your Facebook Friends
|
Is the recent movement towards anonymous methods/functions by mainstream languages like C++ and C# something important, or a weird feature that violates OO principles?
Are recent libraries like the most recent version of Intel's Thread Building Blocks...
Started by RD1 on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Object Orientation is a design philosophy, not a set many-fold, refusing them merely on "it violates pure OO model" is rather self-defeating: the overall goal is to design good software, NOT to....
Perceived violation of pure OO principles.
|
|
Ignoring skilled people, libraries, and tools in both types of languages, are there good reasons to pick an OO language over a functional language? For what kind of projects?
Update: I ask this question because I have read so many good things about functional...
Started by StackUnderflow on
, 14 posts
by 14 people.
Answer Snippets (Read the full thread at stackoverflow):
The most obvious answer....
There are some languages that do a good job of blending the OO and functional paradigms (I believe F# and Scala are two that do this, to a certain extent, depending on your definition of "OO" and "functional").
|
|
I'm reading through the Source Making site, specifically the Refactoring section. On the page describing the Long Method problem, the following statement is made:
Older languages carried an overhead in subroutine calls, which deterred people from small...
Started by intermension on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Modern OO languages have "older languages" have less of an overhead....
What matters is keeping the layers and layers of (largely now OO) software working correctly an overhead in subroutine calls, which deterred people from small methods.
|
|
In Javascript OO, when should I use the this keyword?
Also, if I want to call a method of a class from another method of the same class, should I use this or just the name of the function? E.g is this correct?
function Foo() { this.bar= function() { alert...
Started by Click Upvote on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
The function every time a new instance is created.)
The correct version is the one that doesn't give.
|
|
I am just starting to model the data for a new C# project, which must be persistable.
Looks like the most natural OO model will have lots of nested .Net generics. Lists of objects, and these objects will also contain Lists of other generic types, and ...
Started by Tom Bushell on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Also, the only classes in your object model that need to be "dumbed down-type) needs a database primary key ... .
I think the real question is how can I develop my OO model, be it OO or not.
Domain model, and they are certainly not painful.
|
|
My relative is studying programming and has a hard time understanding classes. He has trouble understanding for example that you need to instantiate it, that methods cannot access variables in other methods and if you change a variable in one instance...
Started by Gunnar Steinn on
, 17 posts
by 17 people.
Answer Snippets (Read the full thread at stackoverflow):
OO is about three....
While you are explaining OO with animals, do not forget to illustrate the "is-a" relationship to the point.
With OO.
That a piece of code meant to wash a floor with a huge mop decided to do it with your toothbrush .
|
|
I believe, that the usage of preprocessor directives like #if UsingNetwork is bad OO practice - other coworkers do not. I think, when using an IoC container (e.g. Spring), components can be easily configured if programmed accordingly. In this context ...
Started by tobsen on
, 13 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Is that Evil?
Is the Preprocessor anything....
And C is not Object-oriented.
The preprocessor is the incarnation of evil, and the cause of all pain on earth" -Robert (OO Guru)
IMHO, you talk about C and C++, not about OO practice in general.
|