4 ms·
Ask HN: Procedural or object oriented programming?
Hey everyone.
I recently deleted my scripting language since I wasn't happy with it, and I knew it wasn't popular anyway. I want to know if I should make the language more oriented or procedural, but am unsure myself.
So I ask you: out of the two, do you prefer procedural or object oriented programming?
- ColinWright 12y agoCreating a language for someone else rarely works - you need to create it for your own compelling use case. If you don't find it essential and natural for something, why should anyone else? And if there is a compelling use case, write up why your language is a better fit. People will then prove you wrong, and if you can convincingly refute all their arguments, then you might have something.
- SamReidHughes 12y agoProcedural vs. object oriented isn't an interesting distinction. Every good general purpose language in use supports some sort of run-time polymorphism, but it's an open definition as to what constitutes true object orientation.
- kyllo 12y agoMost object-oriented languages are also procedural, so that isn't a dichotomy. Procedural vs. functional and imperative vs. declarative are more interesting dichotomies to focus on. If you are designing a new language, especially one for a particular problem domain, it generally makes sense to make the language fairly high-level and declarative. SQL is the classic example of a declarative domain specific language, you use the language to specify what data to retrieve, and behind the scenes the database engine figures out how to retrieve it. Anyway, what is your purpose or goal in creating a programming language? Are you trying to create a general purpose language that can substitute for Python/Ruby/Perl? Or are you trying to solve any specific problem with it?