Hacker News new | past | comments | ask | show | jobs | submit login

> completely wrong and ruined our perception of OOP.

or maybe Erlang is its own thing and OOP -as what most people are thinking when talking about it- is the set of practices followed in languages descended from the cross between C and Smalltalk.

This explains how every introductory course in OOP using either Java, C#, Python, etc. will list some sort of OOP principles always including something along "objects talk to each other though message passing" which is hand-waved simply as something to do with taking other objects by ref

  // taking a reference
  bar.someMethod(foo)
 
Or some form of import method

  import Foo;
  
  class Bar {
    someMethod() {
       // init the import
       foo = new Foo() 
       // ... do something with it
       foo.someMethod()
    } 
  }
which is worse since you need a huge disclaimer to explain that in practice you need to account for Dependency Injection and something for Mocking.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: