From: raims@... (Lawrence Oluyede) Date: 2007-03-10T21:15:05+09:00 Subject: Re: A couple of questions from a Ruby neophyte Chad Perrin wrote: > If you've ever noticed the way OOP characteristics look bolted-on in > Perl, you might understand how regex support looks bolted-on in Python. > For one thing, regex support is provided only through a library, rather > than as part of the core language -- in other words, it really *is* > bolted on. That's maybe a deficiency in language design but I don't think the Python's regex support is worse because of that. The 're' module is very comprehensive and it's object oriented. The matching objects are _objects_ indeed. Ruby does have regexp support builtin but hey, there must be some differences between the languages or we won't be here to talk about those :-) > It's better than Java's regex support. In fact, it may be in the top > half-dozen languages for regex support, but after extensive use of > Perl's it feels half-baked. So far (which isn't too far yet), Ruby's > regex support is a very close second to Perl's, in my opinion. In fact, > there are a couple things I think Ruby does better. Never been a Perlista so I can't really judge but I do like the builtin Ruby support for regexp and I don't dislike the Python's one (being mostly a Pythonista myself) so I guess I'm caught up in the middle. > You might want to judge Ruby syntax on something other than a > demonstration of irb. I agree. My first taste of Ruby syntax was not really that good but after a couple of more bites I really enjoyed the meal and there are cases where I find Ruby to cleaner than Python. -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man to understand something when his salary depends on not understanding it" - Upton Sinclair