From: Stu Date: 2010-11-26T06:55:35+09:00 Subject: Re: Should I do functional programming in Ruby? Only you can answer that question. If your interested in programming in like C procedural you may feel that it feels more like shell scripting than C. though you can and there are helper objects which may make you feel at home for your data structures (i.e. push pop) and there is also an implementation of printf and sprintf. Understand though that Ruby is as far as you can get from the whole "showing the implementation" as you may be used to in C. Ruby is object oriented to the extreme. Everything is a sender and a receiver. Your return statements as well as parens are optional and implied. Also case statements actually work and are not "broken" like they are in c/c++/java. The concept of "least astonishment" refers to programmers who migrate from other languages may feel comfortable programming in ruby with minor learning curve( if any). I believe looking at what is unique ruby is what you may want to investigate. Ruby has the ability to manipulate itself and evolve through it's own meta-structures and introspection. I would imagine functional programming though closures may play a role in this as well. Though I also know it's optional. Just like everything else in ruby the choice is yours. ~ On Thu, Nov 25, 2010 at 2:26 PM, Yu-Hsuan Lai wrote: > I'm a high school student and beginner of ruby. > I know that ruby is a functional-hybrid language which has many elegant > features such as first-class function, closure and implicit return. > > But I also have heard the slogan "least astonishment". > I only used to learn C and C++. In my country, majority of students (school > or university) study C/C++/Java and self-study C#/VB/PHP/ASP. We seldom use > lisp or haskell. > I think that for most people, functional programming can cause much > astonishment. > Of course readability is important. So, should I write ruby in C-like > paradigm in order to decrease astonishment? > > -- > Lai, Yu-Hsuan >