4 ms·
Ask HN: Procedural programming vs OOP – your thoughts?
Is there a place for purely procedural programming languages in todays computing landscape?
These thoughts were prompted by an interview with Niklaus Wirth, the creator of Pascal, Modula-2 and Oberon. In the interview [1] published in 2009, Wirth is asked: "How do you see the future for procedural programming languages?"
Wirth replies:
> Procedural programming is still the most common paradigm, and it will remain so, because the semantic gap between procedural languages and computers is smaller than for any other paradigm. Instruction sequences are represented by statements, and the state space by variables.
>I consider object-oriented languages also as procedural. They emphasize the grouping of related data into objects, and the attachment of methods to objects. The close relationship between object-oriented and procedural views becomes apparent if we relate the respective terminologies: Basically the terms class, object, and method stand for the classical type, variable, and procedure. Instead of calling a procedure, we now send a message.
Do you agree with Wirth's belief that OOP is essentially procedural, but dressed up in new terminology?
If you program in an OOP language, is most of your code written in procedural style (i.e. with minimal or even no use of objects)?
If someone created a new procedural programming language today, would anyone take it seriously?
[1] https://www.simple-talk.com/opinion/geek-of-the-week/niklaus-wirth-geek-of-the-week/
- dragonbonheur 10y agoMost of the time, an object is just a user defined type with methods. No need to split hairs about it. End of story.
- codr4life 10y agoYou mean, is there still space for C? I'd say yes. I can't remember last time I used classes/objects unless forced to, despite using polymorphism/runtime dispatch every day. Go for it, follow your intuition.
- ankurdhama 10y agoA procedure defines "order of things". So no matter what you are programming in, if you are defining "order of things" in any manner then you are defining a procedure (even if you call it by other names like method or function).