On Wed, Oct 20, 2010 at 9:15 AM, hard wyrd <[email protected]> wrote:
> I use Ruby at work for doing system admin tasks (instead of using Perl), so
> for me learning Rails is a non-requirement. Ruby is quite capable if you
> take it for a step further

I usually use static-typed languages, or languages that have at some
level a notion of a nonvariant type.  C, C++, Objective-C, Java, etc.

When I use Ruby, it's like throwing all the good form and careful
planning I've ever known out the window.  It's a wonderful, bizarre
experience made actually fun by Ruby's wonderful syntax.  Something
about

    foo = "hello, world!"
    bar = String.new
    foo.each_char do |c|
        bar << c unless !c.matches(/[a-zA-Z0-9]/)
    end

is just crazy beautiful.  In C... well...

    char * foo = "hello, world!"
    char * bar = (char *)malloc(sizeof(char) * 1);
    bar = "\0";
    for(size_t i = 0;
        i < strlen(foo);
        ++i)
            if((foo[i] > 'a' && foo[i] < 'z') ||
               (foo[i] > 'A' && foo[i] < 'Z') ||
               (foo[i] > '0' && foo[i] < '9'))
                   bar = strcat(bar, foo[i]);

And all that is just hoping that your regex is simple enough to be
quickly implemented in pure C.  :)  Finding a good regex engine that
works in C can be quite difficult.  You want it to be small,
efficient, bug-free, and to integrate with your code well enough that
you don't incur the wrath of evil dependency issues.

So yeah, Ruby is an awesome language.  Granted, when the rubber meets
the road, C is more efficient.  But if you're not concerned with
speed, or the speed you're concerned with isn't going to be helped by
some bare-knuckles C coding, then Ruby is your language.

For instance, the only way I'll touch web programming these days is
with RoR.  Simple, elegant, clean.  J2EE?  Big, complex, hard to
deploy, and makes me want to do myself bodily harm.  RoR lets me get
on with my life, J2EE becomes my life.  Big difference.  :)

-- 
Registered Linux Addict #431495
For Faith and Family! | John 3:16!
fsdev.net
0x5f3759df.org

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

Reply via email to