Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

maybe I would have been, but now its 20 years later and people actually have done some OOP and they know what it is really like in practice, and are no longer just reciting the bullet points from a slide show they saw at a conference.

what are the other paradigms we usually contrast with imperative though?

Declarative style can be done with OOP but it is still implemented in an almost strictly imperative way internally within the classes implementing the interfaces. Even the gluing together of interfaces is usually done in a more imperative than declarative style with OOP. The ideal for OOP is to have declarative interfaces from top to bottom but we almost never achieve this goal in practice.

Functional style is basically not done with OOP. It's possible, and my first exposure to "objects" was in working with closures in Scheme. However, in mainstream OOP functional style is only used as part of a mixed paradigm approach. We see a lot of this in languages like Python, Ruby, and Javascript.

Aspect-oriented programming? orthogonal to the question of imperative vs. not. This style is supported naturally in almost any language that offers first class introspection of its runtime but is only popular in niche use cases.

The actor model (i.e. what Erlang does)? A subset of functional style that is designed for highly concurrent systems. Orthogonal to imperative vs. non-imperative. Each actor within a system is probably an imperatively coded procedure. The system as a whole is not.

Why am I bothering to point this stuff out? Because I want to get past the kind of shallow and limiting view that the label "imperative style" matters.



  >Functional style is basically not done with OOP.
Check out Smalltalk, it's actually more derived from Lisp than from Simula.

  >The actor model (i.e. what Erlang does)? 
Smalltalk matches the actor model. A lot of people compare Erlang and Smalltalk, actually.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: