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

I might have used Ruby but I hear Kernighan & McCarthy turning in their graves whenever I type "end" where a bracket would do the job.

Then don't type end, type } instead. Yes, it works.

If you're going to try something and give up before learning syntax, that's great, but trying to speak authoritatively is misleading.



Well, I haven't seen a lot of ruby code that uses } instead of end, have you? So using }, although legal, might not be within standard ruby practice.

The fact that it _allows_ 'end' would be enough to turn me off :]

I guess 'end' wasn't the only reason - while I don't actively dislike Ruby, I just prefer scheme or the lisp family. Part of that is the logical consistency of the lisp languages, part of it is purely personal taste.


Standard Ruby style is to use { } when the code block is inline or a single liner, and do/end on multi-line blocks. This is only common style though.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: