On Friday 06 June 2008 12:02:19 Jenda Krynicky wrote: > David Masover wrote: > > On Wednesday 04 June 2008 12:20:37 Star Cross wrote: > > > >> Lesson: You can make Ruby every bit as messy as Perl if you want to. > > > > Very true. But can you make Perl as pretty as Ruby? > > BS. Not unexpected. Besides beauty is in the eye of the beerholder, > cleanliness likewise. People who don't know me often make the mistake of assuming I ask rhetorical questions. I really don't think Perl can be made as pretty as Ruby, but then, Perl has Acme::Lingua::Pirate::Perl, so anything's possible. > > Every language can be made messy. Not every language can be made clean. > > Agreed. For example with the meaningful newlines there are cases when > you can't make the Ruby code clean, because you either can't break the > overly long line or you can, but you end up with an operator lost on the > far right or with some silly line continuation character. However, with required semicolons, you have every line looking ugly, except just the edge cases. And that's just line endings -- never mind the dereference operator and $calar prefix that become pretty much pure annoyance for OOP. Also, it's hardly unprecedented -- shells have had meaningful newlines with \ escaping forever. > Robert Klemme (Guest) on 04.06.2008 23:00 wrote: > > I have the impression that when writing Perl programs people usually > > use nested structures of arrays, hashes and scalars to represent > > complex data whereas in Ruby land people - at least I - tend to rather > > create classes and use them because it is so much easier than in Perl. > > Or could it be that using the nested structures is harder in Ruby? Is it? Looks pretty easy to me. > Oftentimes the classes are simple to make but do they give you anything? Yes, it's called Object-Oriented Programming. Perhaps not in every case, but I would argue that because of how much more tedious Perl makes classes -- and nice patterns like setters/getters -- there are going to be cases where a separate class would really be appropriate, but Perl people will tend towards data structures instead. > Dave Bass (dogsbody) on 05.06.2008 17:01 wrote: > > I find the contrary. Uncommented Perl is typically impossible to > > understand unless you wrote it yourself. It *is* possible to write > > clear Perl but, as with C, most people don't bother. > > Uncommented hungarian is impossible to understand as well ... unless you > actually know that language. Or maybe you were talking about golf or > yaph or poetry? I don't think this is a comment on the actual languages, but their respective communities. If people are drawn to Ruby because of pretty syntax, they're probably likely to hold clean, readable syntax as a desirable goal. But that could also be a reflection of Perl having been around for so much longer that it has a more diverse community. I won't say more about that, though. I care more about being able to code cleanly from scratch than how much clean code already exists to play with -- otherwise, I'd probably be using Perl, for CPAN alone.