Ruby has ruined my C++

J

John Carter

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++...



John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : (e-mail address removed)
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.
 
P

Phil Tomson

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++...

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
 
L

Lothar Scholz

Hello John,

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

JC> C++ is just so hard compared to Ruby. So fragile, so stiff, so
JC> 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++.
 
J

jason r tibbetts

John said:
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.
 
L

Laurent Julliard

mathew said:
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
 
K

Kero

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? :p

+--- Kero ------------------------- kero@chello@nl ---+
| all the meaningless and empty words I spoke |
| Promises -- The Cranberries |
+--- M38c --- http://members.chello.nl/k.vangelder ---+
 
G

Gennady Bystritksy

Kero said:
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.
 
J

Joe Van Dyk

=20
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?
 
G

Gennady Bystritksy

Joe said:
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.
 
J

Jeff Waltzer

------=_Part_12423_3762088.1121455255774
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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

Michael Campbell

=20
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.

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.

--=20
I tend to view "truly flexible" by another term: "Make everything
equally hard". -- DHH
 
T

tony summerfelt

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

def initalize
button_text("quit")
self.show
placeongrid()
# you get the idea
end

def button_text(t)
quit_text=t
end

def click
app.cleanup
end
end


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

Devin Mullins

Lothar said:
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
 
K

Kero

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:

b = TkButton.new(nil, "text"=>"quit").pack
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 |
| Promises -- The Cranberries |
+--- M38c --- http://members.chello.nl/k.vangelder ---+
 
H

Hidetoshi NAGAI

From: Kero <[email protected]>
Subject: Re: ] Re: Ruby has ruined my Java (was Re: Ruby has ruined my C++)
Date: Mon, 18 Jul 2005 07:05:53 +0900
Message-ID: said:
and in Ruby/Tk you do:

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

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

Why did you write it in two lines? ;-)
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: ] Re: Ruby has ruined my Java"

|> b = TkButton.new(nil, "text"=>"quit").pack
|> b.command { exit }
|
|Or,
| b = TkButton.new(nil, :text=>'quit', :command=>proc{exit}).pack
|
|Why did you write it in two lines? ;-)

Perhaps he saw my recent slide, which tried to explain callback
blocks.

matz.
 
C

Carl Woodward

Sorry this isn't a reply to the Tk problems. I would like to say that
ruby has ruined all other languages for me except for c (and hopefully
lisp when I get to learn it). I find that I am now writing a lot of c
in the ruby fashion and then calling it from ruby. I am trying to
write some game engine code (just playing around at the moment) and
wrappering it with ruby.
I write Java and C# for work and I am always sad. I really miss
closures and other key features. I am currently writing an application
with an existing library and if I had closures I would be able to make
changes to the existing code base in a really simple and elegant
manner but without them I either have to spend a lot of time
refactoring or just hack something together.

Ruby has quite easily become my favorite language. Maybe this will
change when I learn lisp but for the moment I am really happy with it.

Hi,
=20
In message "Re: ] Re: Ruby has ruined my Java"
=20
|> b =3D TkButton.new(nil, "text"=3D>"quit").pack
|> b.command { exit }
|
|Or,
| b =3D TkButton.new(nil, :text=3D>'quit', :command=3D>proc{exit}).pa= ck
|
|Why did you write it in two lines? ;-)
=20
Perhaps he saw my recent slide, which tried to explain callback
blocks.
=20
matz.
=20
=20


--=20
Carl Woodward
0412218979
(e-mail address removed)
 
L

Lothar Scholz

Hello Devin,

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

Sorry but this is not true.

WxWindows never did this. It has an event table to dispatch events
to handlers methods.

Of couse you can do it with every toolkit but it nowhere the
recommended programming style and there are good reasons for it.
 
T

tony summerfelt

Lothar Scholz wrote on 7/17/2005 2:49 PM:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top