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

This article reads like "yeah Erlang has a lot of cool features, but it's really scary to an OO programmer like me."

> I can’t imagine how you can organize large code-bases in Erlang or even work as team, and this doesn’t feel right to any OO programmer.

Well, yeah, but neither would Clojure or Haskell or a host of other interesting and useful languages. Functional programming is a completely different paradigm, and if you come into with an OO mindset the results will not be good. But that's more a fault of the programmer than the language.



To quote Joe Armstrong: "As Erlang became popular we were often asked "Is Erlang OO" - well, of course the true answer was "No of course not" - but we didn't to say this out loud - so we invented a serious of ingenious ways of answering the question that were designed to give the impression that Erlang was (sort of) OO (If you waved your hands a lot) but not really (If you listened to what we actually said, and read the small print carefully)."

http://www.sics.se/~joe/bluetail/vol1/v1_oo.html

Erlang is closer to original Smalltalk than most of current OO languages: there are processes (objects) which communicate by messages (messages).

I also should mention OOHaskell: http://homepages.cwi.nl/~ralf/OOHaskell/ "In the second and major phase, we systematically substantiate that Haskell~98, with some common extensions, supports all the conventional OO features plus more advanced ones, including first-class lexically scoped classes, implicitly polymorphic classes, flexible multiple inheritance, safe downcasts and safe co-variant arguments. Haskell indeed can support width and depth, structural and nominal subtyping. We address the particular challenge to preserve Haskell's type inference even for objects and object-operating functions. Advanced type inference is a strength of Haskell that is worth preserving. Many of the features we get ``for free'': the type system of Haskell turns out to be a great help and a guide rather than a hindrance."

So everyone "can has" his OO everywhere, in case one needs it.


Don't really know Erlang, but having worked for Telecom industry earlier, I would guess Erlang is getting its concepts and messaging model from SDL [1] rather than from OO.

[1] http://en.wikipedia.org/wiki/Specification_and_Description_L...


I think 4 could be a legitimate concern - if there are no good resources for you to learn from, you don't want to accidentally put your company into a position where you have an unmaintainable code base because of a "known unknown". However these days we have the wonderful open source code being put out by the Basho people as a useful guide, so it's no longer a problem with Erlang.


My take on that sentence was not that author was comparing functional with object-oriented but rather the available tools and other infrastructure necessary to manage teams of developers and deploy code.


The argument seems slightly different a standard "this isn't what I'm used".

It's more like "I know how OO allow teams to work together. I don't know how functional programming does that".

What would be the answer to that?


functional programming and in particular erlang is pretty much a godsend for working with a large codebase.

erlang is designed around intercommunication, there was some rule about how a team of 3 would make a 3 pass compiler, in erlang everything is explicitly isolated and you have to design specifically how the various parts of the system communicate with each other




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

Search: