From: "David A. Black" Date: 2008-10-07T19:01:31+09:00 Subject: Re: Why not adopt "Python Style" indentation for Ruby? Hi -- On Tue, 7 Oct 2008, Frasier Mruby wrote: > Justin Collins wrote: > >> None of your suggestions seem to address this issue. Matching 'end' is >> no harder than matching '}'. If you get confused, add documentation like >> some people do: >> >> end#if >> end#while >> end#class >> > > It's a good way. It's just that there're more typings. If you says > "matching end is no harder than }, then } could be an considered as an > option I assume. That doesn't follow. >>> My first thought to use brace "{...}" to replace "END" since it's a >>> popular convention. >>> >> >> But then it looks like C/Java. >> > > Liking other languages may not be bad. Ruby's syntax on my first > impression is that it's similar to python, thinking about the "class" or > "def". Ruby has evolved by learning merits from other languages. Yes, to a large extent. But Ruby also *is* a language. It's not an experiment in how to stick different ideas from other languages together. Have you written to any C mailing lists, suggesting that C adopt features from Ruby? >> I think 'end' looks fine, personally. I used to use curly braces all the >> time, but now I find myself using them as little as possible. do/end >> seems nicer and I don't get them confused with hashes that way. >> > > Thanks for your reply, Justin. It seems I am not the only one who are > concerned with the "END". Not 2 years ago, 1 year ago, or now. On > ruby's logo, it says "programmer's best friend". It seems ruby's > objective is to make it programmer-friendly language. When there are > not few people have been wondering if any improvement could be made on > its syntax, some effort may need to be considered on the improvement. > If it's determined there's absolutely no room to improve, then that's > fine. It's been discussed a million times over many years, if that's what you mean. If Matz were going to remove the "end" keyword, I think he would have done it by now. > If no improvement will be made in near future, I can live with "END", > though in my mind I may still have the thought of it and wondering if it > could be made better. > > Don't get my wrong. I hope ruby getting better and can attract more > programmers. With this mind, I pointed what I felt, which is shared by > other new comers. Please don't put this in terms of Ruby attracting programmers. Ruby does about as good a job as any language I've ever heard of, when it comes to having programmers like it. Not everyone does, of course, but Matz has accomplished something truly great and amazing in exactly that sense. "end" is not a test of whether or not Ruby is an attractive language, and curly braces are not Ruby's ticket to popularity. In general, the best thing by far is to spend some time with the language, and let it speak to you. David -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL Advancing with Rails January 19-22 Fort Lauderdale, FL * * Co-taught with Patrick Ewing! See http://www.rubypal.com for details and updates!