procedural programming
Moderator: General Moderators
procedural programming
I heard someone say they were a procedural programmer.
Not sure what this means really. Do they mean (in the case of php), writing the code to do the job, but without using classes and functions?
Not sure what this means really. Do they mean (in the case of php), writing the code to do the job, but without using classes and functions?
well it is more about organization, workflow etc. models and way of thinking.rsmarsha wrote:So if i was to write a file with no functions and classes, just with code down the page in an order to do what was needed. Thats procedural?
If you make a class with 20 methods(functions) in it that do all kind of different stuff...this does not make it object programming.
Procedural programming is one of many programming paradigms. Other notable paradigms are functional programming and object oriented programming.
http://en.wikipedia.org/wiki/Programming_paradigms
http://en.wikipedia.org/wiki/Programming_paradigms
Imho when someone says that you're a 'procedural programmer' in a PHP context it's usually meant as an insult...
Since that someone used the 'procedural' word you might want to ask *him* what he meant with it, because as you already noticed there are a couple of different definitions for the word...
Since that someone used the 'procedural' word you might want to ask *him* what he meant with it, because as you already noticed there are a couple of different definitions for the word...
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Procedural vs. Object Oriented. Ah, you can almost smell the smoldering piles of ...
In some PHP circles, procedural code is commonly refered to as code that does not use Objects. It uses functions and such, but does not utilize objects for he core programming technique. Bear in mind, just because you use some objects, that does not mean that you are coding in Object Oriented Style.
Object Oriented Programming on the other hand uses classes (objects) for the predominant portion of the code.
There is a lot more to this that just this little example, but it is a fair assumption that if someone says they are a procedural programmer, that means they either choose not to use OOP or they don't know how.
In some PHP circles, procedural code is commonly refered to as code that does not use Objects. It uses functions and such, but does not utilize objects for he core programming technique. Bear in mind, just because you use some objects, that does not mean that you are coding in Object Oriented Style.
Object Oriented Programming on the other hand uses classes (objects) for the predominant portion of the code.
There is a lot more to this that just this little example, but it is a fair assumption that if someone says they are a procedural programmer, that means they either choose not to use OOP or they don't know how.
Hey, I've got a genuine question since I appear to have missed something...feyd wrote:Just so everyone is aware, this is an extremely touchy and volatile subject area. The moderators will lock this thread if it comes anywhere near a flame war. So keep it civil and you'll be allowed to continue talks.
How is being a 'procedural programmer' insulting? My code in PHP is primarily procedural because I'm using it for scripting - and also because I'm more at home in the land of C99. It's just a programming style - admittedly some languages are meant to be used as OOP (can't see SmallTalk being used otherwise...).
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
The policy comes from past issues we've had with certain individuals starting wars over OOP vs Procedural camps of programming. I won't go any further into this line of discussion. If you want to know what's happened, take a look at previous threads of this nature.AngusL wrote:Hey, I've got a genuine question since I appear to have missed something...
How is being a 'procedural programmer' insulting? My code in PHP is primarily procedural because I'm using it for scripting - and also because I'm more at home in the land of C99. It's just a programming style - admittedly some languages are meant to be used as OOP (can't see SmallTalk being used otherwise...).I can see people being proponents of one or t'other... but I'd have thought that would be a little naïve given 'the right tool for the job' idea.