From: jcb@... (MetalOne) Date: 2002-12-12T08:22:09+09:00 Subject: Re: functional programming "style" "zesar" wrote in message news:<3df78342$0$38812$91cee783@newsreader01.highway.telekom.at>... > i discovered ruby some weeks ago and i have to say now that i'm through with > the book of the pragmatic programmers i quite like the language. > > so far i've been coding in c/c++, java and COBOL (that was really painful > :) )... i guess that's why my code keeps on looking very procedural although > i'm writing ruby. > > i'm very fascinated by the few examples of functional programming-style i've > seen so far but i don't quite get the picture on how to "think this way"... > i mean i DO understand what the examples do and mean but i wouldn't be able > to write them myself... > > i know there are some other (more) functional languages than ruby but i > don't have the energy nor the time to learn them. and i just want to get a > good coding style in ruby... > > the book of the pragmatic programmers is a very good reference but i lack > some sort of > think-styleguide-on-functional-programming-for-procedural-programmers or > something likewise... or is there just some kind of "magic sentence" - a > "spell" ;-)) that can teach me how to.... > > anyway, i'd love to get some tips or some recommendations where to find such > a guide (hopefully there's a free one, i don't like buying books for i don't > really have the money - but don't hesitate to recommend a book - better than > nothing)... > > thank you in advance, > patrick Actually, Ruby is an Object-Oriented Language. Examples of functional languages are LISP and HASKELL. I am not sure if you want to grasp the Object-Oriented programming style or the Functional programming style. You can use Ruby to write in a somewhat functional style if you want to, but Ruby would not be the language to use to learn functional programming. You could program in Ruby using a somewhat functional style.