From: "Michael T. Richter" Date: 2006-12-18T18:17:06+09:00 Subject: Re: does Ruby generate WINDOWS and dialog boxes? --=-Sl4+Qej1EWa2HjlB0CpY Content-Type: multipart/related; type="multipart/alternative"; boundary="=-GBWLMhMMG8P+u3huvg4g" --=-GBWLMhMMG8P+u3huvg4g Content-Type: multipart/alternative; boundary="=-12E7jA2U1Acbzwf9xMW/" --=-12E7jA2U1Acbzwf9xMW/ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2006-18-12 at 16:50 +0900, Richard wrote: > > Wow! Someone used the words "C++" and "elegant" in the same sentence > > without a negative in between and with no hint of irony. > I know you meant that in a light-hearted way. Yet, I wonder whether > you agree that there have been a lot of books sold on that topic? And > that most of those by people under no duress? Point me to a single book that calls C++ "elegant" written by someone who, you know, designs languages. C++ is a hack built on a hack. Problem #1 with C++ (of several billion): it requires literally infinite lookahead to fully parse. This is not something I would ever consider even remotely elegant. > Then I wonder whether you read Stroustrup's "The Design and Evolution > of C++"? It strikes me as a great engineering example. Do you agree. > (For that matter, do you think the development of C was great > engineering?) No and no. C was not great engineering. It was a high level assembler full of quirks based on its first implementation platform (PDP-11) -- quirks that kill (sometimes literally) to this very day. It is acceptable (barely) as a systems programming tool provided it is used under intensely-inspected environments. Its use in applications verges on the criminal culpability side of things. The list of useful (and some necessary) features that C lacks for application programming includes, but is not limited to, automated memory management, bounds-checked strings and arrays, natural range notation (imagine now nice "switch" could be if you had range notations!), no meaningful error handling (i.e. exception handling), no true mechanism for module management (separation of interface from implementation, in other words -- #include doesn't cut it) ... This list could go on for days. And the funny part is that much of this stuff was available in languages which predate C -- so it's not as if the designers didn't have access to the ideas behind them. C++ is a hack layered on this hack. Despite being designed for projects "in the large" it still has no support for automated memory management which, given its unnatural appetite for memory (in typical C++ programming), is really funny. Further, although an "object-oriented" language, things like iterators are an afterthought (and it shows!) added later on in the library interface instead of being a core part of the language. And it still sucks--despite the addition of namespaces, classes, etc.--at actually helping in modular programming. You have to recompile, for example, if the implementation of a class you're using changes. (I still shake my head at this.) It's not enough just to relink to a new object file/library/whatever. You have to recompile your source. (This is, of course, again because of that filthy #include thing.) Then we have templates.... I'm not even going to begin that rant. > Do you a good opinion of any of the high-level general-purpose > languages? Any that you find elegant? I'm getting really fond of Haskell, actually. I'm having some difficulty with its Monads (mostly because I'm not a mathematician by inclination so the category theory explanations fall on glazed-over eyes here), but having found good introductions to them which don't assume mathematical inclinations I'm ready to allocate another slice of CPU time to tackling them once again. What I like about Haskell, however, is its very dense structure without resorting to executable line noise like, say, extremely hackish Perl code or the APL-descended languages (to cite an extreme example). I really liked Dylan. Which, sadly, died on the vine. =46rom the more classic line, I liked Modula-3 as well -- which also, sadly, died on the vine. > How about Ruby? Rails? Do you find either of them elegant? I would not call Ruby "elegant" but I will call it a joy to program in. (The two can be disjoint.) If it didn't have Perl's magic variables, et al. I'd be more inclined to call it elegant even. I lack sufficient experience in Rails to call it elegant or not. I simply have no opinion. There are some things which at first glance appear very impressive to me, but C++ templates did once too until I had to use them extensively. (My first run-in with ">>" vs. "> >" pretty much ended my love affair with templates in a huge, bloody crash.) > Is it all just a matter of taste? Yes. Bad taste and my taste. ;) --=20 Michael T. Richter Email: ttmrichter@gmail.com, mtr1966@hotpop.com MSN: ttmrichter@hotmail.com, mtr1966@hotmail.com; YIM: michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber: mtr1966@jabber.cn "Sexual organs were created for reproduction between the male element and the female element -- and everything that deviates from that is not acceptable from a Buddhist point of view. Between a man and man, a woman and another woman, in the mouth, the anus, or even using a hand." --The Dalai Lama --=-12E7jA2U1Acbzwf9xMW/ Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, 2006-18-12 at 16:50 +0900, Richard wrote:
> Wow!  Someone used the words "C++" a=
nd "elegant" in the same sentence
> without a negative in between and with no hint=
 of irony.

I know you meant that in a light-hearted way.  Yet,=
 I wonder whether
you agree that there have been a lot of books sold =
on that topic?  And
that most of those by people under no duress?

Point me to a single book that calls C++ "elegant" written by som= eone who, you know, designs languages.  C++ is a hack built on a hack.=

Problem #1 with C++ (of several billion): it requires literally infinite lo= okahead to fully parse.  This is not something I would ever con= sider even remotely elegant.

Then I wonder whether you read Stroustrup's "T=
he Design and Evolution
of C++"?  It strikes me as a great engineering=
 example.  Do you agree.
(For that matter,  do you think the development of =
C was great
engineering?)

No and no.  C was not great engineering.  It was a high level ass= embler full of quirks based on its first implementation platform (PDP-11) -= - quirks that kill (sometimes literally) to this very day.  It is acce= ptable (barely) as a systems programming tool provided it is used under int= ensely-inspected environments.  Its use in applications verges on the = criminal culpability side of things.  The list of useful (and some nec= essary) features that C lacks for application programming includes, but is = not limited to, automated memory management, bounds-checked strings and arr= ays, natural range notation (imagine now nice "switch" could be i= f you had range notations!), no meaningful error handling (i.e. exception h= andling), no true mechanism for module management (separation of interface = from implementation, in other words -- #include doesn't cut it) ...  T= his list could go on for days.  And the funny part is that much of thi= s stuff was available in languages which predate C -- so it's not as if the= designers didn't have access to the ideas behind them.

C++ is a hack layered on this hack.  Despite being designed for projec= ts "in the large" it still has no support for automated me= mory management which, given its unnatural appetite for memory (in typical = C++ programming), is really funny.  Further, although an "= object-oriented" language, things like iterators are an afterthought (= and it shows!) added later on in the library interface instead of being a c= ore part of the language.  And it still sucks--despite the addition of= namespaces, classes, etc.--at actually helping in modular programming.&nbs= p; You have to recompile, for example, if the implementation of a cl= ass you're using changes.  (I still shake my head at this.)  It's= not enough just to relink to a new object file/library/whatever.  You= have to recompile your source.  (This is, of course, again because of= that filthy #include thing.)

Then we have templates....  I'm not even going to begin that rant.

Do you a good opinion of any of the high-level gene=
ral-purpose
languages?  Any that you find elegant?

I'm getting really fond of Haskell, actually.  I'm having some difficu= lty with its Monads (mostly because I'm not a mathematician by inclination = so the category theory explanations fall on glazed-over eyes here), but hav= ing found good introductions to them which don't assume mathematical inclin= ations I'm ready to allocate another slice of CPU time to tackling them onc= e again.  What I like about Haskell, however, is its very dense struct= ure without resorting to executable line noise like, say, extremely hackish= Perl code or the APL-descended languages (to cite an extreme example).

I really liked Dylan.  Which, sadly, died on the vine.

=46rom the more classic line, I liked Modula-3 as well -- which also, sadly, = died on the vine.

How about Ruby?  Rails?  Do you find eith=
er of them elegant?

I would not call Ruby "elegant" but I will call it a joy to progr= am in.  (The two can be disjoint.)  If it didn't have Perl's magi= c variables, et al. I'd be more inclined to call it elegant even.

I lack sufficient experience in Rails to call it elegant or not.  I si= mply have no opinion.  There are some things which at first glance app= ear very impressive to me, but C++ templates did once too until I had to us= e them extensively.  (My first run-in with ">>" vs. &q= uot;> >" pretty much ended my love affair with templates in a hu= ge, bloody crash.)

Is it all just a matter of taste?

Yes.  Bad taste and my taste.  3D";)"

-- 
Michael T. Richter
Email: ttmrichter@gmail.com= , mtr1966@hotpop.com
MSN: ttmrichter@hotmail.com= , mtr1966@hotmail.com; YIM: michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber: mtr1966@jabber.cn

"Sexual organs were created for reproduction betwe= en the male element and the female element -- and everything that deviates = from that is not acceptable from a Buddhist point of view. Between a man an= d man, a woman and another woman, in the mouth, the anus, or even using a h= and." --The Dal= ai Lama
--=-12E7jA2U1Acbzwf9xMW/-- --=-GBWLMhMMG8P+u3huvg4g Content-ID: <1166433339.9653.31.camel@localhost.localdomain> Content-Disposition: attachment; filename=smiley-4.png Content-Type: image/png; name=smiley-4.png Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC/UlEQVR42n2Tf2iUdRzHX9/v8zy3 u91ulnO5pXGXUUsK1yIY9ke0CDQiodbQKCOnNieaIkKI/yRhf0QgCeEqViKUYgUOnTE9G5WtjlqB TV1bsnl0tV93u93ux3PP93meb/8sKBNf8P7jw/v9+fz1/sD/iQI7gB7AWdApoGPB+w/ihvnI/bHK bfu2NLF2zUrMcAw8G2d+mIGBi+w/nGE46XQBnTc7cOFAZ+MTO1/bgDBCuIVxnPwIQhgYwXqMQA2q MMahd+O8fWLmAvAkgLGw/MGbOx55fueuF/FKKVRxHF/NIaQFgO+kcQtjgGZ1cwyjOLXiuyG7DuiV QLSx4fat2zvX4dmTeOVphDCwvUqkWcVk2mfDnkGEtPCdLEJabH95CfctN7YBUQk83XNoMUJaTE+M cuT476x9pZfmZ3sI1D7D8fMeP/2a4a3uGaqWt6Ly1zBDdbzadhvAowLomrn0eocqXMeoqCVU+xga E2mYlKb6sSINtG58gzOnTzGf/BR7+hukWUni52u07p04aS5bdudmAN/NURZ3oSe+RBhhhLTQGsqZ BKd7Pic3fhSVGwLAtaeoX2IAPGem02kQJrP5EHJRHYb0CHhZtG+CdtFeiezIO2h3Hu17OI6Dqxzy RR8AadvlXu0WqDSm6O87xkzWx6p+AF/l8N08vmejvRLaV7jKJjNnEwwvJTXtASQk0FecOEsoUs/6 9RuJx8+RGOgjuLgZK7ISzBo8X9L/w1+07RnmnqZ2RpNlrg7lAU4IILrq3sh437GnMCruIFD9IL8M fsvQpUE+OiO4fGWYRVUGhw+2sablIZJXPiN+cYwPT2b4LaUb/mli94Etsfatm5pwi0kisU1Y4RUI IfHsSTQalR/lcuJj/ph0Od8/y9G46gI6/13lrzrW1bTs3RwmEKxGyAp8lWN2rkShpCkrzfU/FYkf 53j/rPM18PjNnqn77jrZ/kJLFasaQ4SDglJZk533GUspvjiXZSTFJ8BL3IIosBv4HlBAGrgKvAc8 fGP4b4kpTGRKdd96AAAAAElFTkSuQmCC --=-GBWLMhMMG8P+u3huvg4g-- --=-Sl4+Qej1EWa2HjlB0CpY Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBFhlyALqyWkKVQ54QRAqW0AKDCU22ApN/silXg71zCOcsPEHAn8ACfbk/Q oDosaYBc1CmYDM3QvkQ34AA= =wGnS -----END PGP SIGNATURE----- --=-Sl4+Qej1EWa2HjlB0CpY--