Erlang/OTP Forums

Author Message

<  Erlang  ~  Erlang best practice and patterns, etc.

Erlang IDE/text editor

Vim  
10%
  [ 1 ]  10%
 
Emacs  
70%
  [ 7 ]  70%
 
Eclipse  
10%
  [ 1 ]  10%
 
NetBeans  
0%
  [ 0 ]  0%
 
Textmate  
0%
  [ 0 ]  0%
 
Notepad++  
10%
  [ 1 ]  10%
 
Other  
0%
  [ 0 ]  0%
 

Total Votes : 10
halyph
Posted: Wed Oct 07, 2009 11:42 pm Reply with quote
Joined: 07 Oct 2009 Posts: 1 Location: Ukraine
Hi All,
There is great 'GoF' book for OOP languages.
Is there any specific book/web-resource which describe Erlang best practices, approaches, patters, etc.
View user's profile Send private message
prof3ta
Posted: Thu Oct 08, 2009 9:37 am Reply with quote
User Joined: 06 Feb 2009 Posts: 34
Here's a nice discussion on design patterns applied to functional languages:

http://stackoverflow.com/questions/327955/does-functional-programming-replace-gof-design-patterns

Essentially, they claim that most of the GOF design patterns are pointless when applied to a functional language. I'm not completely agree with this. I still believe common design patterns can be identified in functional languages.

Regarding Erlang, I would say that OTP contains a good set of useful patterns. Shouldn't we consider supervisor or gen_server sort of design patterns?
Apart from that, I don't think any "GOF version for Erlang" exists yet.

I wrote my first "pattern" just yesterday. I named it "Black Box" and it's about stubbing Erlang applications during unit tests. You might want to have a look to it:
http://aloiroberto.wordpress.com/2009/10/07/erlang-quickcheck-design-patterns-black-box/
It's just an idea and comments/suggestions are obviously welcome.

It would be nice to start a section on Trapexit about all this, though.

Regards,

Roberto Aloi
http://www.erlang-consulting.com
http://aloiroberto.wordpress.com
View user's profile Send private message
rvirding
Posted: Thu Oct 08, 2009 6:31 pm Reply with quote
User Joined: 30 Aug 2006 Posts: 452 Location: Stockholm, Sweden
prof3ta wrote:
Essentially, they claim that most of the GOF design patterns are pointless when applied to a functional language. I'm not completely agree with this. I still believe common design patterns can be identified in functional languages.

Yes, there are design patterns in functional languages, but they are different from the ones for OOP. This is discussed in detail in the discussion you reference. There is nothing strange about this as FP and OOP are different.
View user's profile Send private message Visit poster's website MSN Messenger

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum