# Ruby has ruined my C++

**URL:** <https://rubytalk.org/t/ruby-has-ruined-my-c/19509>\
**Category:** ruby-talk\
**Created:** [13 July 2005 21:27 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509 "2005-07-13T21:27:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Carter](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@John\_Carter](https://rubytalk.org/u/John_Carter)\
**Post date:** [13 July 2005 21:27 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/1 "2005-07-13T21:27:37Z")

</div>

These are exciting days in the world of C++. Every month the C/C++ User Journal is packed with exciting articles on brilliant innovations in the areas of...  
&nbsp;&nbsp;&nbsp;\* Standards advancement  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hashes WhooHoo! Regexes! At last!  
&nbsp;&nbsp;&nbsp;\* Template metaprogramming  
&nbsp;&nbsp;&nbsp;\* New template libraries.  
&nbsp;&nbsp;&nbsp;\* Even Duck Typing!

And I read it all and just feel vaguely nauseated.

C++ is just so hard compared to Ruby. So fragile, so stiff, so error-prone with incredibly subtle gotchas on every corner.

It pains me now to even look at C++, even though for many years it was my language of choice.

Ruby advocacy is not merely sharing the pleasure, it's important for avoiding the pain of being forced financially back into writing C/C++...

John Carter Phone : (64)(3) 358 6639  
Tait Electronics Fax : (64)(3) 359 4632  
PO Box 1645 Christchurch Email : [john.carter@tait.co.nz](mailto:john.carter@tait.co.nz)  
New Zealand

Carter's Clarification of Murphy's Law.

"Things only ever go right so that they may go more spectacularly wrong later."

From this principle, all of life and physics may be deduced.

---

<div class="post-metadata">

**Author:** ![Ptkwt](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Ptkwt](https://rubytalk.org/u/Ptkwt)\
**Post date:** [13 July 2005 22:50 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/2 "2005-07-13T22:50:51Z")

</div>

In article \<Pine.LNX.4.63.0507140919460.29274@parore.tait.co.nz\>,

> **···**
>
> John Carter \<john.carter@tait.co.nz\> wrote:
> 
> > These are exciting days in the world of C++. Every month the C/C++ User  
> > Journal is packed with exciting articles on brilliant innovations in the  
> > areas of...  
> > &nbsp;&nbsp;\* Standards advancement  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hashes WhooHoo! Regexes! At last!  
> > &nbsp;&nbsp;\* Template metaprogramming  
> > &nbsp;&nbsp;\* New template libraries.  
> > &nbsp;&nbsp;\* Even Duck Typing!
> > 
> > And I read it all and just feel vaguely nauseated.
> > 
> > C++ is just so hard compared to Ruby. So fragile, so stiff, so  
> > error-prone with incredibly subtle gotchas on every corner.
> > 
> > It pains me now to even look at C++, even though for many years it was my  
> > language of choice.
> > 
> > Ruby advocacy is not merely sharing the pleasure, it's important for  
> > avoiding the pain of being forced financially back into writing C/C++...
> 
> C++ can be painful, but as you say things are changing in C++ land. There  
> are some nice developments going on, especially with Boost.
> 
> I have to use C++ for some things (Ruby on it's own just isn't fast enough  
> yet) but I do find that the two (Ruby and C++) complement each other  
> rather nicely (especially usign Swig or by embedding ruby into a C++ app).
> 
> Phil

---

<div class="post-metadata">

**Author:** ![Lothar\_Scholz2](https://avatars.discourse-cdn.com/v4/letter/l/f14d63/32.png) [@Lothar\_Scholz2](https://rubytalk.org/u/Lothar_Scholz2)\
**Post date:** [13 July 2005 23:09 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/3 "2005-07-13T23:09:05Z")

</div>

Hello John,

> And I read it all and just feel vaguely nauseated.

> C++ is just so hard compared to Ruby. So fragile, so stiff, so  
> error-prone with incredibly subtle gotchas on every corner.

Not only when compared to Ruby. At the moment i don't know any other  
language that is so hard to learn and understand in the details as C++.

> **···**
>
> --  
> Best regards, emailto: scholz at scriptolutions dot com  
> Lothar Scholz [http://www.ruby-ide.com](http://www.ruby-ide.com)  
> CTO Scriptolutions Ruby, PHP, Python IDE 's

---

<div class="post-metadata">

**Author:** ![jason\_r\_tibbetts](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jason\_r\_tibbetts](https://rubytalk.org/u/jason_r_tibbetts)\
**Post date:** [14 July 2005 14:24 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/4 "2005-07-14T14:24:06Z")

</div>

John Carter wrote:

> These are exciting days in the world of C++. Every month the C/C++ User Journal is packed with exciting articles on brilliant innovations in the areas of...  
> &nbsp;&nbsp;\* Standards advancement  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hashes WhooHoo! Regexes! At last!  
> &nbsp;&nbsp;\* Template metaprogramming  
> &nbsp;&nbsp;\* New template libraries.  
> &nbsp;&nbsp;\* Even Duck Typing!
> 
> And I read it all and just feel vaguely nauseated.
> 
> C++ is just so hard compared to Ruby. So fragile, so stiff, so error-prone with incredibly subtle gotchas on every corner.
> 
> It pains me now to even look at C++, even though for many years it was my language of choice.
> 
> Ruby advocacy is not merely sharing the pleasure, it's important for avoiding the pain of being forced financially back into writing C/C++...

It's ruined my Java, too. I recently discovered java.lang.reflect.Proxy (as used by the wonderful EasyMock framework), and I've since had to suppress the urge to make everything an interface with so implementation just so that I can make a Proxy out of it and call methods dynamically. It's no Ruby (or Smalltalk), but it's something.

---

<div class="post-metadata">

**Author:** ![mathew](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@mathew](https://rubytalk.org/u/mathew)\
**Post date:** [14 July 2005 18:40 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/5 "2005-07-14T18:40:52Z")

</div>

jason r tibbetts wrote:

> It's ruined my Java, too.

It's ruined my Perl. I can't stand Perl syntax any more. "Why do I have to keep remembering these stupid semicolons? Why do I need $ symbols everywhere? What are all these arrows for? Is this a value or a reference? Aargh!"

Fortunately, that's exactly the effect I was hoping for.

mathew

---

<div class="post-metadata">

**Author:** ![Jeff\_Waltzer1](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@Jeff\_Waltzer1](https://rubytalk.org/u/Jeff_Waltzer1)\
**Post date:** [15 July 2005 19:21 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/6 "2005-07-15T19:21:06Z")

</div>

I find myself writting lots of anonymous inner classes in a vain attempt at  
doing code blocks in Java.

> **···**
>
> On 7/14/05, jason r tibbetts \<tibbettj@verdi.iisd.sra.com\> wrote:
> 
> > John Carter wrote:  
> > \> These are exciting days in the world of C++. Every month the C/C++ User  
> > \> Journal is packed with exciting articles on brilliant innovations in the  
> > \> areas of...  
> > \> \* Standards advancement  
> > \> Hashes WhooHoo! Regexes! At last!  
> > \> \* Template metaprogramming  
> > \> \* New template libraries.  
> > \> \* Even Duck Typing!  
> > \>  
> > \> And I read it all and just feel vaguely nauseated.  
> > \>  
> > \> C++ is just so hard compared to Ruby. So fragile, so stiff, so  
> > \> error-prone with incredibly subtle gotchas on every corner.  
> > \>  
> > \> It pains me now to even look at C++, even though for many years it was  
> > \> my language of choice.  
> > \>  
> > \> Ruby advocacy is not merely sharing the pleasure, it's important for  
> > \> avoiding the pain of being forced financially back into writing C/C++...
> > 
> > It's ruined my Java, too. I recently discovered java.lang.reflect.Proxy  
> > (as used by the wonderful EasyMock framework), and I've since had to  
> > suppress the urge to make everything an interface with so implementation  
> > just so that I can make a Proxy out of it and call methods dynamically.  
> > It's no Ruby (or Smalltalk), but it's something.
> 
> --  
> It is the duty of a patriot to protect his country from its government"  
> -Thomas Paine  
> Blog: [http://superwombat.blogspot.com](http://superwombat.blogspot.com)  
> Bookmarks: [http://del.icio.us/jeffwaltzer](http://del.icio.us/jeffwaltzer)

---

<div class="post-metadata">

**Author:** ![Laurent\_Julliard1](https://avatars.discourse-cdn.com/v4/letter/l/c6cbf5/32.png) [@Laurent\_Julliard1](https://rubytalk.org/u/Laurent_Julliard1)\
**Post date:** [14 July 2005 19:28 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/7 "2005-07-14T19:28:22Z")

</div>

mathew wrote:

> jason r tibbetts wrote:
> 
> > It's ruined my Java, too.
> 
> It's ruined my Perl. I can't stand Perl syntax any more. "Why do I have to keep remembering these stupid semicolons? Why do I need $ symbols everywhere? What are all these arrows for? Is this a value or a reference? Aargh!"
> 
> Fortunately, that's exactly the effect I was hoping for.
> 
> mathew

Two!

Laurent

---

<div class="post-metadata">

**Author:** ![Kero1](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@Kero1](https://rubytalk.org/u/Kero1)\
**Post date:** [14 July 2005 20:00 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/8 "2005-07-14T20:00:51Z")

</div>

> Two!

C++ managed to ruin itself in a few months.  
Java took 2.5 years to ruin itself.  
Ruby came after that.

After 4 years, Ruby still hasn't ruined itself.  
Did I become more forgiving, or is the language really easier to use? 😛

+--- Kero ------------------------- kero@chello@nl ---+

> all the meaningless and empty words I spoke |  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Promises -- The Cranberries |

+--- M38c --- [http://members.chello.nl/k.vangelder](http://members.chello.nl/k.vangelder) ---+

---

<div class="post-metadata">

**Author:** ![Gennady1](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@Gennady1](https://rubytalk.org/u/Gennady1)\
**Post date:** [14 July 2005 20:12 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/9 "2005-07-14T20:12:56Z")

</div>

Kero wrote:

> > Two!
> 
> C++ managed to ruin itself in a few months.

I actively use and still love C++ after 10 years. It does not prevent me from loving Ruby even more ;-). I must admit, though, that my C++ style got affected a great deal by the latter.

Gennady.

---

<div class="post-metadata">

**Author:** ![tony\_summerfelt](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@tony\_summerfelt](https://rubytalk.org/u/tony_summerfelt)\
**Post date:** [17 July 2005 17:58 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/10 "2005-07-17T17:58:37Z")

</div>

> After 4 years, Ruby still hasn't ruined itself.

after working with it for a few months i'm starting to see some holes.

there doesn't seem to be a 'standard' gui that's fully implemented for  
ruby. the gui's that AREA available need work. and for newbies they  
aren't easy to work with at all.

in tcl/tk you can use this to create a button

button .b -text "quit" -command {exit}  
pack .b

i'd really like something like this for ruby (off the top of my head):

class quit\_button \< button

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def initalize  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;button\_text("quit")  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.show  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;placeongrid()  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# you get the idea  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def button\_text(t)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quit\_text=t  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def click  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;app.cleanup  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
end

even with my limited knowledge/experience of ruby this is straight  
forward to me

> **···**
>
> --  
> [http://home.cogeco.ca/~tsummerfelt1](http://home.cogeco.ca/~tsummerfelt1)  
> telnet://ventedspleen.dyndns.org

---

<div class="post-metadata">

**Author:** ![J-Van](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@J-Van](https://rubytalk.org/u/J-Van)\
**Post date:** [15 July 2005 04:24 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/11 "2005-07-15T04:24:51Z")

</div>

Why do you love it?

> **···**
>
> On 7/14/05, Gennady Bystritksy \<gfb@tonesoft.com\> wrote:
> 
> > Kero wrote:  
> > \>\>Two!  
> > \>  
> > \>  
> > \> C++ managed to ruin itself in a few months.
> > 
> > I actively use and still love C++ after 10 years. It does not prevent me  
> > from loving Ruby even more ;-). I must admit, though, that my C++ style  
> > got affected a great deal by the latter.

---

<div class="post-metadata">

**Author:** ![Michael\_Campbell](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@Michael\_Campbell](https://rubytalk.org/u/Michael_Campbell)\
**Post date:** [17 July 2005 15:47 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/12 "2005-07-17T15:47:21Z")

</div>

Can you expand on this a little? I find myself "borrowing" paradigms  
and styles from one language/platform/pattern/etc. to the next as I  
play with them, and would love to hear others' experiences in  
cross-language idea implementation.

> **···**
>
> On 7/14/05, Gennady Bystritksy \<gfb@tonesoft.com\> wrote:
> 
> > Kero wrote:  
> > \>\>Two!  
> > \>  
> > \>  
> > \> C++ managed to ruin itself in a few months.
> > 
> > I actively use and still love C++ after 10 years. It does not prevent me  
> > from loving Ruby even more ;-). I must admit, though, that my C++ style  
> > got affected a great deal by the latter.
> 
> --  
> I tend to view "truly flexible" by another term: "Make everything  
> equally hard". -- DHH

---

<div class="post-metadata">

**Author:** ![Lothar\_Scholz2](https://avatars.discourse-cdn.com/v4/letter/l/f14d63/32.png) [@Lothar\_Scholz2](https://rubytalk.org/u/Lothar_Scholz2)\
**Post date:** [17 July 2005 18:49 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/13 "2005-07-17T18:49:49Z")

</div>

Hello tony,

> in tcl/tk you can use this to create a button

> button .b -text "quit" -command {exit}  
> pack .b

> i'd really like something like this for ruby (off the top of my head):

> class quit\_button \< button

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def initalize  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;button\_text("quit")  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.show  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;placeongrid()  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# you get the idea  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def button\_text(t)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quit\_text=t  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def click  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;app.cleanup  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
> end

Inheritance just for the purpose to add callbacks/configuration  
already proved to be wrong a long time ago. The only framework which  
tried this was self, but as self is OO without classes it's not  
comparable.

From the length of your example you should see where the problem is.

> **···**
>
> --  
> Best regards, emailto: scholz at scriptolutions dot com  
> Lothar Scholz [http://www.ruby-ide.com](http://www.ruby-ide.com)  
> CTO Scriptolutions Ruby, PHP, Python IDE 's

---

<div class="post-metadata">

**Author:** ![Kero1](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@Kero1](https://rubytalk.org/u/Kero1)\
**Post date:** [17 July 2005 22:05 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/14 "2005-07-17T22:05:53Z")

</div>

> > After 4 years, Ruby still hasn't ruined itself.
> 
> after working with it for a few months i'm starting to see some holes.

I didn't say there were no holes. No language is perfect. But so far the  
positive experiences outweigh the negative ones, easily.

> there doesn't seem to be a 'standard' gui that's fully implemented for  
> ruby. the gui's that AREA available need work. and for newbies they  
> aren't easy to work with at all.

uhm. some people like some GUI binding of Ruby. Others hate the same  
binding. Personally, I haven't seen a single good GUI library in any  
language; so I can't hold this against Ruby 🙂

> in tcl/tk you can use this to create a button
> 
> button .b -text "quit" -command {exit}  
> pack .b

and in Ruby/Tk you do:

&nbsp;&nbsp;&nbsp;b = TkButton.new(nil, "text"=\>"quit").pack  
&nbsp;&nbsp;&nbsp;b.command { exit }

I fail to see what you're trying to argue here...

+--- Kero ------------------------- kero@chello@nl ---+

> all the meaningless and empty words I spoke |  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Promises -- The Cranberries |

+--- M38c --- [http://members.chello.nl/k.vangelder](http://members.chello.nl/k.vangelder) ---+

> **···**
>
> On 2005-07-17, tony summerfelt \<snowzone5@hotmail.com\> wrote:

---

<div class="post-metadata">

**Author:** ![mathew](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@mathew](https://rubytalk.org/u/mathew)\
**Post date:** [18 July 2005 16:30 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/15 "2005-07-18T16:30:53Z")

</div>

tony summerfelt wrote:

> there doesn't seem to be a 'standard' gui that's fully implemented for  
> ruby.

Well, there isn't a "standard" GUI that's fully implemented for all the platforms Ruby runs on. wxWidgets is probably the closest, but it's not a full implementation of the OS X GUI, for example.

\<URL:[http://wxruby.rubyforge.org/&gt](http://wxruby.rubyforge.org/&gt);

mathew

---

<div class="post-metadata">

**Author:** ![Gennady1](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@Gennady1](https://rubytalk.org/u/Gennady1)\
**Post date:** [15 July 2005 15:51 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/16 "2005-07-15T15:51:30Z")

</div>

Joe Van Dyk wrote:

> > Kero wrote:
> > 
> > > > Two!
> > > 
> > > C++ managed to ruin itself in a few months.
> > 
> > I actively use and still love C++ after 10 years. It does not prevent me  
> > from loving Ruby even more ;-). I must admit, though, that my C++ style  
> > got affected a great deal by the latter.
> 
> Why do you love it?

Hmm, I do not know. Maybe when you spent time to get to know something in depth, you start appreciating it more. Maybe because it allows me to refactor legacy C code to gradually get to OO implementation with all its benefits (true unit testing, code reuse, etc.)

In any case, if you keep to a certain (hopefully right) way of doing C++, it may be pretty enjoyable. I adopted many principles that often keep me from trouble there. However, I know that I always can step aside from them if I need to be more flexible sometimes.

And of course it makes you feel special that you are comfortable and can deal with something many people only whining about 😉

Gennady.

> **···**
>
> > On 7/14/05, Gennady Bystritksy \<gfb@tonesoft.com\> wrote:

---

<div class="post-metadata">

**Author:** ![Devin\_Mullins](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@Devin\_Mullins](https://rubytalk.org/u/Devin_Mullins)\
**Post date:** [17 July 2005 21:17 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/17 "2005-07-17T21:17:31Z")

</div>

Lothar Scholz wrote:

> Inheritance just for the purpose to add callbacks/configuration  
> already proved to be wrong a long time ago. The only framework which  
> tried this was self, but as self is OO without classes it's not  
> comparable.

wxWindows (now wxWidgets, I'm told) does this, and made programming windows in C++ oodles easier for me. But that's neither here nor there. 🙂

Devin

---

<div class="post-metadata">

**Author:** ![Hidetoshi\_NAGAI](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@Hidetoshi\_NAGAI](https://rubytalk.org/u/Hidetoshi_NAGAI)\
**Post date:** [17 July 2005 23:01 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/18 "2005-07-17T23:01:02Z")

</div>

Message-ID: \<slrnddllcd.33i.kero@chmeee.m38c.nl\>

> and in Ruby/Tk you do:
> 
> &nbsp;&nbsp;&nbsp;b = TkButton.new(nil, "text"=\>"quit").pack  
> &nbsp;&nbsp;&nbsp;b.command { exit }

Or,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b = TkButton.new(nil, :text=\>'quit', :command=\>proc{exit}).pack

Why did you write it in two lines? 😉

> **···**
>
> From: Kero \<kero@chello.single-dot.nl\>  
> Subject: Re: ] Re: Ruby has ruined my Java (was Re: Ruby has ruined my C++)  
> Date: Mon, 18 Jul 2005 07:05:53 +0900  
> --  
> Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

---

<div class="post-metadata">

**Author:** ![tony\_summerfelt](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@tony\_summerfelt](https://rubytalk.org/u/tony_summerfelt)\
**Post date:** [18 July 2005 11:29 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/19 "2005-07-18T11:29:40Z")

</div>

> Inheritance just for the purpose to add callbacks/configuration  
> already proved to be wrong a long time ago. The only framework which  
> tried this was self, but as self is OO without classes it's not  
> comparable.

obviously my example wasn't meant as the next innovation for ruby 🙂  
it was just an example of the kind of simplicity i'd like to see.

> From the length of your example you should see where the problem is.

even as i was typing it up i could see where there were problems. as  
it was i completely forgot to type in the second and third parts of my  
language.

the second being about ruby installs, and the third being back to the  
gui subject and more specfically gui builders.

> **···**
>
> Lothar Scholz wrote on 7/17/2005 2:49 PM:
> 
> --  
> [http://home.cogeco.ca/~tsummerfelt1](http://home.cogeco.ca/~tsummerfelt1)  
> telnet://ventedspleen.dyndns.org

---

<div class="post-metadata">

**Author:** ![tony\_summerfelt](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@tony\_summerfelt](https://rubytalk.org/u/tony_summerfelt)\
**Post date:** [18 July 2005 11:35 UTC](https://rubytalk.org/t/ruby-has-ruined-my-c/19509/20 "2005-07-18T11:35:59Z")

</div>

ease.

if the first line were:

b=TkButton.new(text=\>"quit").pack

i'd be a lot happier. i realize that tk has to be shoehorned into  
ruby's oo'ness.

ignore me. could be i'm just frustrated at trying to recreate my own  
interface (tkblog) in ruby 🙂

> **···**
>
> Kero wrote on 7/17/2005 6:05 PM: \> and in Ruby/Tk you do:
> 
> > &nbsp;&nbsp;&nbsp;b = TkButton.new(nil, "text"=\>"quit").pack  
> > &nbsp;&nbsp;&nbsp;b.command { exit }
> 
> > I fail to see what you're trying to argue here...
> 
> --  
> [http://home.cogeco.ca/~tsummerfelt1](http://home.cogeco.ca/~tsummerfelt1)  
> telnet://ventedspleen.dyndns.org

[Next page](https://rubytalk.org/t/ruby-has-ruined-my-c/19509.md?page=2)
