Ruby vs. TCL/TK?

I’ve just started playing w/ Ruby and like it quite a bit so far.

But I was wondering, I know that TCL/TK has a large following out there. Is
anyone here a convert from TCL/TK to Ruby? If so, why? What do you consider the
relative advantages/disadvantages of each?

Is it a fair comparison?

Can GUI apps be created with Ruby as easily as with TCL/TK?

Interested in your thoughts,

Christopher

Christopher J. Meisenzahl CPS, CSTE
Senior Software Testing Consultant
Spherion
christopher.j.meisenzahl@citicorp.com

In article H00019f0088ba98c@MHS,

I’ve just started playing w/ Ruby and like it quite a bit so far.

    • Caution: My TCL knowledge is way out of date, I haven’t really
      looked at it closely since about 1995 or so… ( But I am in the
      FAQ… )

But I was wondering, I know that TCL/TK has a large following out there. Is
anyone here a convert from TCL/TK to Ruby? If so, why? What do you consider the
relative advantages/disadvantages of each?

    • TCL would be great if people used it for what it was designed
      for, a “Tool Command Language”. As an embeddable language I
      thought it was great, and while TK is showing it’s age in
      1993 it was quite a step ahead of other available X toolkits.
      I found TCL to be somewhat painful as a general purpose
      scripting language. I think you can sum up the difference
      in the two languages as follows:

    In TCL everything is a string.

    In Ruby everything is a object.

Is it a fair comparison?

    • IMHO, not really. One was designed to be imbedded from day One
      and the other is designed to be object-oriented from day One.
      They each make different compromises in design. If I were
      looking at embedding a scripting language in my application,
      I would not put Ruby at the top of my list[1], but I think
      TCL still compares favorably with things like Lua. Contrarily,
      TCL would probably be my last choice to write a pure scripting
      tool in these days. I think TCL’s popularity is basically
      down to two things:
  1. It was there “fastest with the mostest”. In the early '90’s
    there was no scripting language with anywhere as near as
    good an Xwindows interface and toolkit. Add expect into the
    mix and you have a very powerful tool.

  2. It was not perl. There were people that detested perl from
    the very first.

Can GUI apps be created with Ruby as easily as with TCL/TK?

    • IMHO it’s easier in Ruby, getting documentation on the Ruby Tk
      interface is the hardest part. But, there are plenty of other
      Ruby GUI interfaces and some of then are even documented %-).
    • Booker C. Bense

[1]- Not at least the current ruby implementation.

···

christopher.j.meisenzahl@citicorp.com wrote:

Is it a fair comparison?

Can we compare apples and oranges?
They’re both fruit. Both round. Both come from trees.
But they’re still vastly different.

Tcl’s great as a simple, small, embeddable scripting language.
Ruby is great as an OO scripting language.

Can GUI apps be created with Ruby as easily as with TCL/TK?

My opinion: no. It’s just soooo easy to create/pack/grid widgets
in Tcl/Tk. Seems like all the toolkits for Ruby really make it
much messier. It’s not Ruby’s fault, though.

Just my thoughts on it.

···

christopher.j.meisenzahl@citicorp.com wrote:


Mike Hall
http://www.enteract.com/~mghall

    • Caution: My TCL knowledge is way out of date, I haven’t really
      looked at it closely since about 1995 or so…

That’s ancient history, in Tcl/Tk time. :frowning:

    • TCL would be great if people used it for what it was designed
      for, a “Tool Command Language”.

I think it’s a fine “glue” language, too.

I found TCL to be somewhat painful as a general purpose
scripting language.

Coming from a standard UNIX environment of shell, awk, and sed,
I found Tcl/Tk a wonderful and refreshing tool to use.

Now I feel the same about Ruby.

Some work I do in Ruby, some I still do in Tcl/Tk,
some is still sh/awk/sed. The right tool for the job.

In TCL everything is a string.

Yeah, in the dark ages, that was true.
Internally, it’s string, list, hash, integer, floating point, proc,
and others. Hmmm! Like Ruby! :slight_smile:
However, there is a fluid motion between strings and the other types.
When you need to use them like a string, they are converted.
Don’t have to do an explicit “.to_s” on them.

In Ruby everything is a object.

In Tcl, everything is a Tcl_Object.
Well, internally. :slight_smile:

···

bbense+comp.lang.ruby.Aug.19.02@telemark.stanford.edu wrote:


Mike Hall
http://www.enteract.com/~mghall