Slashdot Mirror


Programming in the Ruby Language

ShoeHorn writes: "Here is a good article (1st of a 4 part series), that introduces you to the Ruby language. If you are currently a programmer coming from the likes of C++, Perl, or Python, you will see some strong similarities (especially to Python)."

1 of 345 comments (clear)

  1. Re:Please clarify by HiThere · · Score: 2, Redundant

    I really hate Python's indentation scheme. Really. Really. As of this month (or next) they will have solved the licensing issues that had been bothering me since around the time of Python 1.6, and basically caused me to switch languages (well, I'd only written a couple of programs in it, so there was no big investment), but on thinking about switching back I really notice just how much I hate the indentation scheme. I really prefer tabs to spaces, and some python editors seem to feel compelled to switch tabs to spaces. Programs keep breaking because of this. In no other language have I had this kind of problem.

    I keep(kept) trying to think of some alternate syntax that would be easy to preprocess into the non-delimited form, but all of the traditional parenthetic characters on my keyboard have already been prempted for other uses. And of course if I do design this, then none of the standard tools would work with it. So I'd need an easy way to do a bijective mapping. And at a minimum this would mean parsing all of the strings to be sure that the parenthetic marking I was using wasn't a part of a string instead of a code delimiter. Basically I'd be writing a complete parsing engine with a two-way mapping.

    So one of the things that I really like about Ruby is that it didn't adopt the alignment delimited program logic. I certainly see using alignment as an added check for logic correctness, but there should be syntax markers that determine the syntax. Layout should be for verification.

    --

    I think we've pushed this "anyone can grow up to be president" thing too far.