Linked by Ritesh Kumar on Thu 13th May 2004 19:31 UTC
General Development In recent years "scripting languages" are becoming a path which is a must go for rapid application development. The open source community has seen many scripting language implementations. Some really popular and good ones available are perl and python.
Permalink for comment
To read all comments associated with this story, please click here.
RE: I LOVE RUBY
by phil on Fri 14th May 2004 21:17 UTC

In Ruby
r1 = Regexp.new('^[a-z]+:s+w+')


You can save a lot of typing by doing:
r1 = /^[a-z]+:s+w+/

r1 is now an instance of Regexp, and you can send messages to it, like so:
r1.source #=> converts the regexp to the string:
"^[a-z]+:s+w+"


I suppose the former way of doing it by using Regexp.new looks like a lot of extra typing to Perl folks, while the latter way of doing it looks susiciously too Perlish for Pythonistas. So depending on your audience you can keep both crowds happy ;-)