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

Agreed. It seems messy at first, but what Ruby does is make it possible to write code in the most readable way.

    a[first..last]
    left, right = a[0...pivot], a[pivot...a.len]
    a[start, len]
If the coder picks the right one and the variable names are good, the reader won't have to think about it.


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: