From: Mithrandir on 2 Aug 2010 15:58 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/01/2010 07:34 PM, Albert Hopkins wrote: > On Mon, 2010-08-02 at 01:08 +0200, candide wrote: >> Python is an object oriented langage (OOL). The Python main >> implementation is written in pure and "old" C90. Is it for historical >> reasons? >> >> C is not an OOL and C++ strongly is. I wonder if it wouldn't be more >> suitable to implement an OOL with another one. >> >> Has it ever been planned to rewrite in C++ the historical implementation >> (of course in an object oriented design) ? > > Disclaimer: I am neither a C nor C++ programmer. In fact I can barely > even program in Python ;-) > > I would propose that in fact most programming languages are implemented > in C. Sun's (Oracle's) Java compiler and runtime are written in ANSI C. > The core of the Gnu Compiler Collection (which includes C++ and > Objective-C compilers) is written in C. The official Ruby is > implemented in C. The Squeak Smalltalk implementation uses C instead of > C++. I can't even think of a programming language that is implemented > in C++ (maybe C++ is). > > C seems to be a good, portable language for writing interpreters and > compilers. > > But I wonder if someone has/has tried to write a programming language in > C++ and what were their experiences. > (Sorry if this is a double post, but apparently my last one didn't go through.) I know that LOLCode has a .NET implementation (1), although it's "very much alpha." And someone was apparently working on a C++ only implementation of LOLCode (2), although that was 3 years ago. LOLCode itself is very much alpha anyway and development seems to be very slow (or dead.) Python has a way of extending it's modules with C or C++ (3). 1: http://lolcode.com/implementations/lolcode.net 2: http://forum.lolcode.com/viewtopic.php?id=14 3: http://docs.python.org/release/2.5.2/ext/intro.html - -- People should read more. https://secure.wikimedia.org/wikipedia/en/wiki/User:MithrandirAgain "All that is gold does not glitter, not all those who wander are lost; the old that is strong does not wither, deep roots are not reached by the frost. - From the ashes a fire shall be woken, a light from the shadows shall spring; renewed shall be blade that was broken, the crownless again shall be king." -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJMVyNqAAoJEKo37V1xH7gTeOUH/2/KYc4busZbATSB09ZUgW+v BmydxDTZaPQd0B56JWSeUiz0/kZrufdDrVc3XUTNNF2oa8ExW51IgsaZOxn2UJGv ydplycT1axs5hrzDG72v2Oo7/poPDxSsvpF58dBsb0XSI25I+orHKrTQpwvKz9cf x6nzahUoygTbaVqZUyxCW2Tc7Rv4T2gpskssD8sIYqaRNofNnPbf3h3NA+q4LMkR +F2UF3r1RE1jwJhs6RNAvUJBdLrHkA3isRsjQE38l6AioLdeTs2yrRtc+6xUkAig RxR11qLZl5OOer/Jrmg1My0+ZTYGnIcAfChxPh1YnHuYbp+H7doqLjlKIkoXZms= =F9Ou -----END PGP SIGNATURE-----
From: Mark Lawrence on 2 Aug 2010 17:42 On 02/08/2010 00:08, candide wrote: > Python is an object oriented langage (OOL). The Python main > implementation is written in pure and "old" C90. Is it for historical > reasons? > > C is not an OOL and C++ strongly is. I wonder if it wouldn't be more > suitable to implement an OOL with another one. > > Has it ever been planned to rewrite in C++ the historical implementation > (of course in an object oriented design) ? I can't understand why any serious programmer mentions C++. As soon as I read it, I have to rush either to the kitchen to find a bowl to throw up in, or head for the toilet so I can talk to the great white telephone. Kindest regards. Mark Lawrence.
From: Peter on 2 Aug 2010 17:56 On Aug 3, 7:42 am, Mark Lawrence <breamore...(a)yahoo.co.uk> wrote: > On 02/08/2010 00:08, candide wrote: <snip> > > I can't understand why any serious programmer mentions C++. As soon as I > read it, I have to rush either to the kitchen to find a bowl to throw up > in, or head for the toilet so I can talk to the great white telephone. > > Kindest regards. > > Mark Lawrence. With you there Mark - IMO C++ is an abortion that should never have seen the light of day. The idea of experimenting with creating an OO language by extending C wasn't such a bad idea for a "play thing" (by Stroustrop) but the fact that it somehow escaped from the Lab and people picked it up and ran with it on a commercial basis is just plain wrong! Personally I liken it to one of those genetically engineered diseases they play around with in biological warfare labs - and unfortunately this one escaped! It has probably set the computing industry back untold years in terms of advancement... Unfortunately I am forced to use it in my day to day life, but at the end of every day I go home and use a purgative to get it out of my system. But there are many deluded youngsters out there who just don't seem to know any better, but then the signs of the breakdown of society surround us on a daily basis and I guess C++ is just another signpost on the way... Peter
From: Michael Torrie on 2 Aug 2010 18:06 On 08/02/2010 03:42 PM, Mark Lawrence wrote: > I can't understand why any serious programmer mentions C++. As soon as I > read it, I have to rush either to the kitchen to find a bowl to throw up > in, or head for the toilet so I can talk to the great white telephone. Sometimes, C++ is just the right tool for the job, despite all its warts. For example, programming GTK apps with GTKmm in C++ is way more pleasant than using C (but nowhere as pleasant as Python). C++'s object semantics (guaranteed destruction, scoping, etc) can sometimes work very well when you need the speed of a compiled language, but don't want to be quite as low-level as C. In this case, C++ is certainly not a better tool for the job than C. But plenty of serious programmers know how to leverage C++ and do so quite successfully. Just because C++ makes you ill in no way proves that C++ is unfit for certain purposes.
From: sturlamolden on 2 Aug 2010 18:18
On 2 Aug, 01:08, candide <cand...(a)free.invalid> wrote: > Has it ever been planned to rewrite in C++ the historical implementation > (of course in an object oriented design) ? OO programming is possible in C. Just take a look at GNOME and GTK. Perl is written in C++. That is not enough to make me want to use it ;) To be honest, C++ can be a great tool. But very few know how to use it correctly. C++ textbooks are also written by people who don't understand the language, and teach bad habits. The typical examples revealing incompetence are use of new[] instead of std::vector, and dynamic resourse allocation outside contructors. C++ compilers used to be bloatware generators; C++ compilers of 2010 are not comparable to those of 1990. C++ is also a PITA for portability. It is not sufficient for Python to only build with Microsoft Visual Studio. |