Re: Why is python not written in C++ ?

2010-08-15 Thread Lawrence D'Oliveiro
In message , Aahz wrote: > Heck, I learned Ada as a sixteen-year-old knowing only BASIC and Pascal. Not so surprising, considering Ada was consciously modelled on Pascal. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-14 Thread Grant Edwards
On 2010-08-14, Aahz wrote: > Paul Rubin wrote: >> >>I'm not sure what the hiring issue is. I think anyone skilled in C++ or >>Java can pick up Ada pretty easily. It's mostly a subset of C++ with >>different surface syntax. > > Heck, I learned Ada as a sixteen-year-old knowing only BASIC and Pa

Re: Why is python not written in C++ ?

2010-08-14 Thread Lawrence D'Oliveiro
In message <44d30ac7-931e-4eb0-9aed-f664c872d...@l20g2000yqm.googlegroups.com>, sturlamolden wrote: > A C++ compiler can use Python's header files and link with Python's C API > correctly. But it cannot compile Python's C source code. A C compiler > is required to compile and build Python. Since

Re: Why is python not written in C++ ?

2010-08-14 Thread Aahz
In article <7xeieevrze@ruckus.brouhaha.com>, Paul Rubin wrote: > >I'm not sure what the hiring issue is. I think anyone skilled in C++ or >Java can pick up Ada pretty easily. It's mostly a subset of C++ with >different surface syntax. Heck, I learned Ada as a sixteen-year-old knowing only

Re: Why is python not written in C++ ?

2010-08-14 Thread Aahz
In article , Grant Edwards wrote: > >I also looked at Modula-3 once, and thought it had some real promise, >but I think it's probably deader than Ada now. That's because you should be using Oberon instead. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "...if

Re: Why is python not written in C++ ?

2010-08-12 Thread Ulrich Eckhardt
sturlamolden wrote: > On 11 Aug, 08:40, Ulrich Eckhardt wrote: > Header (definition) and source (implementation) is not the same. I'm aware of this and that's not the thing I was talking about. Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 -- http

Re: Why is python not written in C++ ?

2010-08-11 Thread sturlamolden
On 11 Aug, 08:40, Ulrich Eckhardt wrote: > That's true, maybe I don't remember the exact rationale. Especially if even > someone like you, who is much deeper into Python development, doesn't, I'm > wondering if I'm misremembering something Header (definition) and source (implementation) is n

Re: Why is python not written in C++ ?

2010-08-10 Thread Ulrich Eckhardt
Martin v. Loewis wrote: > Am 10.08.2010 09:06, schrieb Ulrich Eckhardt: >> When asked on the developers' list, it was said that this was >> intended for compatibility with C++, e.g. in cases where people >> want to embed Python into their C++ projects. Of course, this >> contradicts Christian's sta

Re: Why is python not written in C++ ?

2010-08-10 Thread Martin v. Loewis
Am 10.08.2010 09:06, schrieb Ulrich Eckhardt: > Carl Banks wrote: >> I highly doubt the Python source would build with a C++ compiler. > > As Christian showed, it doesn't. However, look around the sources a bit. > There are lots of places where e.g. the returnvalue of malloc() (or, > rather, the m

Re: Why is python not written in C++ ?

2010-08-10 Thread Carl Banks
On Aug 10, 12:06 am, Ulrich Eckhardt wrote: > Carl Banks wrote: > > I highly doubt the Python source would build with a C++ compiler. > > As Christian showed, it doesn't. However, look around the sources a bit. > There are lots of places where e.g. the returnvalue of malloc() (or, > rather, the ma

Re: Why is python not written in C++ ?

2010-08-10 Thread Lawrence D'Oliveiro
In message , Christian Heimes wrote: > There isn't really a point in cluttering the source with type casts. Makes you wonder why they bothered using a typed language at all. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-10 Thread Ulrich Eckhardt
Carl Banks wrote: > I highly doubt the Python source would build with a C++ compiler. As Christian showed, it doesn't. However, look around the sources a bit. There are lots of places where e.g. the returnvalue of malloc() (or, rather, the macro that resolves to something like it) is explicitly ty

Re: Why is python not written in C++ ?

2010-08-09 Thread Christian Heimes
> I highly doubt the Python source would build with a C++ compiler. > > C++ is "'mostly' 'backwards' compatible" with C insofar as you can > pretty easily write C code that is also legal (and semantically > equivalent) C++. But if you don't actively try to write code that is > compatible with bot

Re: Why is python not written in C++ ?

2010-08-09 Thread Carl Banks
On Aug 9, 6:39 am, Ulrich Eckhardt wrote: > 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? > > The fact that Python is OOP doesn't mean that the implementation of it has > to be w

Re: Why is python not written in C++ ?

2010-08-09 Thread Ulrich Eckhardt
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? The fact that Python is OOP doesn't mean that the implementation of it has to be written using an OOP language. Other than that, I'm actu

Re: Why is python not written in C++ ?

2010-08-08 Thread Lawrence D'Oliveiro
In message , Albert van der Horst wrote: > The bottom line is that to implement a programming language > you want to use a simpler programming language, not a more > complicated one. That would rule out ever using a language to implement itself. -- http://mail.python.org/mailman/listinfo/python-

Re: Why is python not written in C++ ?

2010-08-08 Thread Lawrence D'Oliveiro
In message <8c4g22f5l...@mid.individual.net>, Gregory Ewing wrote: > FWIW, certain parts of the Darwin kernel are written in a > carefully-selected subset of C++. So Apple evidently think > that it makes sense to use some C++ in a Unix kernel under > some circumstances. I wonder if that explains

Re: Why is python not written in C++ ?

2010-08-07 Thread Paul Rubin
Albert van der Horst writes: > We had a similar discussion on comp.lang.forth. Heh, fancy meeting you here ;-) > The bottom line is that to implement a programming language > you want to use a simpler programming language, not a more > complicated one. Nah, gas is written in C, and nobody impl

Re: Why is python not written in C++ ?

2010-08-07 Thread Albert van der Horst
In article , Roy Smith wrote: >In article , > Lawrence D'Oliveiro wrote: > >> In message , Roy Smith wrote: >> >> > C++, for all its flaws, had one powerful feature which made it very >> > popular. It is a superset of C. >> >> Actually, it never was. > >Yes, there are a few corner cases where v

Re: Why is python not written in C++ ?

2010-08-07 Thread Albert van der Horst
In article , Roy Smith wrote: >In article <4c55fe82$0$9111$426a3...@news.free.fr>, > 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 w

Re: Why is python not written in C++ ?

2010-08-07 Thread Gregory Ewing
Lawrence D'Oliveiro wrote: at one time there was an experiment to make the kernel compilable with a C++ compiler, without actually using any C++ features. The result: they lost about 10% in speed. That was enough to put the kernel developers off taking the experiment any further. FWIW, cert

Re: Why is python not written in C++ ?

2010-08-06 Thread Lawrence D'Oliveiro
In message , David Cournapeau wrote: > I have yet seen a project where you could build C code with a C++ > compiler - the only ones I know are specifically designed that way and > it is painful. I seem to recall a FAQ entry, might have been on kernelnewbies.org, asking why the Linux kernel wasn

Re: Why is python not written in C++ ?

2010-08-06 Thread David Cournapeau
On Fri, Aug 6, 2010 at 8:39 PM, Roy Smith wrote: > In article , >  David Cournapeau wrote: > >> > Yes, there are a few corner cases where valid C syntax has different >> > semantics in C and C++.  But, they are very few.  Calling C++ a superset >> > of C is essentially correct. >> >> This is only

Re: Why is python not written in C++ ?

2010-08-06 Thread Roy Smith
In article , David Cournapeau wrote: > > Yes, there are a few corner cases where valid C syntax has different > > semantics in C and C++.  But, they are very few.  Calling C++ a superset > > of C is essentially correct. > > This is only true if you limit yourself to C89 (as python seems to >

Re: Why is python not written in C++ ?

2010-08-05 Thread David Cournapeau
On Fri, Aug 6, 2010 at 8:45 AM, Roy Smith wrote: > In article , >  Lawrence D'Oliveiro wrote: > >> In message , Roy Smith wrote: >> >> > C++, for all its flaws, had one powerful feature which made it very >> > popular.  It is a superset of C. >> >> Actually, it never was. > > Yes, there are a few

Re: Why is python not written in C++ ?

2010-08-05 Thread Roy Smith
In article , Lawrence D'Oliveiro wrote: > In message , Roy Smith wrote: > > > C++, for all its flaws, had one powerful feature which made it very > > popular. It is a superset of C. > > Actually, it never was. Yes, there are a few corner cases where valid C syntax has different semantics in

Re: Why is python not written in C++ ?

2010-08-05 Thread Neil Hodgson
Paul Rubin: > C has all kinds of undefined behavior. "Might need to rely on" is not > relevant for this kind of issue. Ada's designers had the goal that that > Ada programs should have NO undefined behavior. Ada achieves this by describing a long list of implementation defined behaviour (Ann

Re: Why is python not written in C++ ?

2010-08-05 Thread Britt
On Aug 1, 9:34 pm, Albert Hopkins wrote: > On Mon, 2010-08-02 at 01:08 +0200, candide wrote: > > 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 inclu

Re: Why is python not written in C++ ?

2010-08-05 Thread Paul Rubin
Lawrence D'Oliveiro writes: > OK, I have a copy of K&R 2nd Ed on a shelf within reach here. Can you point > out some behaviour that C programmers might need to rely on, that is not > specified in that document? C has all kinds of undefined behavior. "Might need to rely on" is not relevant for

Re: Why is python not written in C++ ?

2010-08-05 Thread Edward Diener
On 8/2/2010 5:42 PM, Mark Lawrence wrote: 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

Re: Why is python not written in C++ ?

2010-08-05 Thread Tim Chase
On 08/05/10 05:33, Lawrence D'Oliveiro wrote: OK, I have a copy of K&R 2nd Ed on a shelf within reach here. Can you point out some behaviour that C programmers might need to rely on, that is not specified in that document? "need to" is considerably different from "might". Size of an int, assu

Re: Why is python not written in C++ ?

2010-08-05 Thread Paul Rudin
Lawrence D'Oliveiro writes: > In message , Roy Smith wrote: > >> C++, for all its flaws, had one powerful feature which made it very >> popular. It is a superset of C. > > Actually, it never was. Wondering off topic a bit - I am reminded of something I once read in some MS blurb... it described

Re: Why is python not written in C++ ?

2010-08-05 Thread Christoffer Viken
C++ is actually not that bad. Can't compare it to C, but nothing compares to C... I think the bad reputation it got (and still has) is from Microsoft's visual studio IDE (that was and still is horrible) A lot of good applications are written in C++, but many bad ones as well. Sorry for swearing in

Re: Why is python not written in C++ ?

2010-08-05 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > C++, for all its flaws, had one powerful feature which made it very > popular. It is a superset of C. Actually, it never was. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-05 Thread Lawrence D'Oliveiro
In message <7xocdi56cp@ruckus.brouhaha.com>, Paul Rubin wrote: > I'd say the Ada standardizers went to a great deal of trouble to specify > and document stuff that other languages simply leave undefined, leaving > developers relying on implementation-specific behavior that's not part > of the

Re: Why is python not written in C++ ?

2010-08-04 Thread Roy Smith
In article , Lawrence D'Oliveiro wrote: > In message , Grant Edwards wrote: > > > The problem has nothing to do with the relative merits of the > > languages. The problem is inertia. > > So how was C++ able to get popular in the first place? And how was Java able > to grab some share from it

Re: Why is python not written in C++ ?

2010-08-04 Thread Carl Banks
On Aug 4, 4:23 pm, Paul Rubin wrote: > Java was also on the OO bandwagon of the 1990's, which > translated into good marketing back then, but is part of the cause of > the massive bureaucracy and bloat in the Java runtime environment.  C++ > seems to have made something of a comeback because of th

Re: Why is python not written in C++ ?

2010-08-04 Thread Carl Banks
On Aug 4, 4:04 pm, Grant Edwards wrote: > On 2010-08-04, Lawrence D'Oliveiro wrote: > > > In message , Grant Edwards wrote: > > >> The problem has nothing to do with the relative merits of the > >> languages.  The problem is inertia. > > > So how was C++ able to get popular in the first place? >

Re: Why is python not written in C++ ?

2010-08-04 Thread Paul Rubin
Lawrence D'Oliveiro writes: > So how was C++ able to get popular in the first place? And how was > Java able to grab some share from it? C++ made improvements over C that were necessary and welcome for controlling the complexity of large programs, while remaining mostly upward compatible with C.

Re: Why is python not written in C++ ?

2010-08-04 Thread Grant Edwards
On 2010-08-04, Lawrence D'Oliveiro wrote: > In message , Grant Edwards wrote: > >> The problem has nothing to do with the relative merits of the >> languages. The problem is inertia. > > So how was C++ able to get popular in the first place? Building on C's popularity helped. > And how was Java

Re: Why is python not written in C++ ?

2010-08-04 Thread Paul Rubin
Lawrence D'Oliveiro writes: > > The Ada 2012 Language Reference Manual is 860 pages ... > Yeah, unfortunately the language was designed by a committee ... > It seems apt to describe the resulting design as “bulletproof”, but > “elegant” or “concise” ... not so much. I'd say the Ada standardizers

Re: Why is python not written in C++ ?

2010-08-04 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > The problem has nothing to do with the relative merits of the > languages. The problem is inertia. So how was C++ able to get popular in the first place? And how was Java able to grab some share from it? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-04 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > In my experience, the hiring issue is "we're already behind schedule > and short-handed, we don't have the time or resources to teach people > a new language." Most people seem to need tutorials or handholding of some sort. Look at the number of questions in t

Re: Why is python not written in C++ ?

2010-08-04 Thread Grant Edwards
On 2010-08-04, Neil Hodgson wrote: > Grant Edwards: > >> That said, the last time I looked the Ada spec was only something like >> 100 pages long, so a case could be made that it won't take long to >> learn. I don't know how long the C++ language spec is, but I'm >> betting it's closer to 1000 th

Re: Why is python not written in C++ ?

2010-08-04 Thread Grant Edwards
On 2010-08-04, Paul Rubin wrote: > I'm not sure what the hiring issue is. I think anyone skilled in C++ > or Java can pick up Ada pretty easily. It's mostly a subset of C++ > with different surface syntax. In my experience, the hiring issue is "we're already behind schedule and short-handed, w

Re: Why is python not written in C++ ?

2010-08-04 Thread Grant Edwards
On 2010-08-04, Paul Rubin wrote: > Grant Edwards writes: >> The issue that would prevent its use where I work is the inability to >> hire anybody who knows Ada. ... >> That said, the last time I looked the Ada spec was only something like >> 100 pages long, so a case could be made that it won't

Re: Why is python not written in C++ ?

2010-08-04 Thread Jean-Michel Pichavant
Carl Banks wrote: On Aug 3, 7:07 pm, Paul Rubin wrote: Mozilla is fed up with C++ and seems to be working on its own language, called Rust: http://lambda-the-ultimate.org/node/4009 That looks much better than Go. It's like all the cool features of Go without the annoying polemics

Re: Why is python not written in C++ ?

2010-08-04 Thread Lawrence D'Oliveiro
In message <7d95c0d3-718d-4958-9364-263c833f1...@i24g2000yqa.googlegroups.com>, sturlamolden wrote: > This is unsafe, anyone who writes this in C++ should be flogged: Only if they’re using exceptions. Otherwise, it’s fine. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-04 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > One feature which can't readily be implemented in C is the automatic > clean-up side of the RAII idiom. Use do-once blocks . -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-04 Thread Lawrence D'Oliveiro
In message , Neil Hodgson wrote: >The Ada 2012 Language Reference Manual is 860 pages and the Ada 2005 > LRM was 790 pages. The annotated versions are even longer > http://www.ada-auth.org/standards/ada12.html Yeah, unfortunately the language was designed by a committee which was trying to

Re: Why is python not written in C++ ?

2010-08-03 Thread Neil Hodgson
Grant Edwards: > That said, the last time I looked the Ada spec was only something like > 100 pages long, so a case could be made that it won't take long to > learn. I don't know how long the C++ language spec is, but I'm > betting it's closer to 1000 than 100. The Ada 2012 Language Reference

Re: Why is python not written in C++ ?

2010-08-03 Thread Paul Rubin
Lawrence D'Oliveiro writes: > I believe the life-support software on the International Space Station is > written in Ada. Would anybody feel happier if that had been done in C++? Take a look at the articles on C bug-finding on Dawson Engler's page: http://www.stanford.edu/~engler/ They are

Re: Why is python not written in C++ ?

2010-08-03 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > There are, however, a lot of people who know a large enough subset of > C++ to be productive ... I think there are some language features, knowledge of which has a negative impact on productivity. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-03 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > That said, the last time I looked the Ada spec was only something like > 100 pages long, so a case could be made that it won't take long to > learn. I don't know how long the C++ language spec is, but I'm > betting it's closer to 1000 than 100. I have a copy o

Re: Why is python not written in C++ ?

2010-08-03 Thread Lawrence D'Oliveiro
In message <7xmxt3uo4h@ruckus.brouhaha.com>, Paul Rubin wrote: > It's more verbose than C, so coding in it takes more keystrokes, but it > looks to me like the general coding approach (modulo the extra keystrokes) > should be similar to that of C, Algol, and so on, and the results should > be

Re: Why is python not written in C++ ?

2010-08-03 Thread Roy Smith
In article , sturlamolden wrote: > On 4 Aug, 04:41, Grant Edwards wrote: > > > The issue that would prevent its use where I work is the inability to > > hire anybody who knows Ada.  You can't hire anybody who knows C++ > > either, but you can hire lots of people who claim they do.   > > That

Re: Why is python not written in C++ ?

2010-08-03 Thread Carl Banks
On Aug 3, 7:07 pm, Paul Rubin wrote: > Mozilla is fed up with C++ and seems to be working on its own language, > called Rust: > >    http://lambda-the-ultimate.org/node/4009 That looks much better than Go. It's like all the cool features of Go without the annoying polemics. I'm starting to get t

Re: Why is python not written in C++ ?

2010-08-03 Thread sturlamolden
On 4 Aug, 04:41, Grant Edwards wrote: > The issue that would prevent its use where I work is the inability to > hire anybody who knows Ada.  You can't hire anybody who knows C++ > either, but you can hire lots of people who claim they do.   That is very true. -- http://mail.python.org/mailma

Re: Why is python not written in C++ ?

2010-08-03 Thread Paul Rubin
Grant Edwards writes: > The issue that would prevent its use where I work is the inability to > hire anybody who knows Ada. ... > That said, the last time I looked the Ada spec was only something like > 100 pages long, so a case could be made that it won't take long to > learn. Well, I don't kn

Re: Why is python not written in C++ ?

2010-08-03 Thread Grant Edwards
On 2010-08-04, Paul Rubin wrote: > Grant Edwards writes: > >> Yep, I've installed Gnat a couple times with the intention of playing >> around with it, but there's pretty much zero chance I could sell it >> at the office in place of C/C++ for embedded stuff, > > I wonder what the issues are. The

Re: Why is python not written in C++ ?

2010-08-03 Thread Paul Rubin
Grant Edwards writes: > Yep, I've installed Gnat a couple times with the intention of playing > around with it, but there's pretty much zero chance I could sell it at > the office in place of C/C++ for embedded stuff, I wonder what the issues are. From everything I've heard, it's a pretty good

Re: Why is python not written in C++ ?

2010-08-03 Thread Grant Edwards
On 2010-08-04, Lawrence D'Oliveiro wrote: > In message , Grant Edwards wrote: > >> I've always thought Ada was a pretty nice embedded/systems languages, >> but some of the initial implementations were indede horrible. > > Well, there?s GNAT, the GNU Ada implementation. Seems pretty robust and > c

Re: Why is python not written in C++ ?

2010-08-03 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > I've always thought Ada was a pretty nice embedded/systems languages, > but some of the initial implementations were indede horrible. Well, there’s GNAT, the GNU Ada implementation. Seems pretty robust and complete, while offering backward compatibility with s

Re: Why is python not written in C++ ?

2010-08-03 Thread Martin v. Loewis
> Has it ever been planned to rewrite in C++ the historical implementation > (of course in an object oriented design) ? Around the time Guido coined the term "Python 3000" (i.e. in 2000), he also said at a few occasions that it would be written in C++. He subsequently dropped the idea, for the rea

Re: Why is python not written in C++ ?

2010-08-03 Thread Roy Smith
In article <87aap3uyo7@castleamber.com>, John Bokma wrote: > > Go look at the original claim, the one that you responded to. "It's > > much easier to distribute C libraries than C++ libraries." > > Yup, and if I read it correctly the claim was: and that's why C++ was > not chosen. I doubt

Re: Why is python not written in C++ ?

2010-08-03 Thread Carl Banks
On Aug 3, 3:19 pm, John Bokma wrote: > Carl Banks writes: > > On Aug 3, 2:29 am, John Bokma wrote: > > [..] > > >> But they call both the C libraries in the same way. > > > Go look at the original claim, the one that you responded to.  "It's > > much easier to distribute C libraries than C++ lib

Re: Why is python not written in C++ ?

2010-08-03 Thread Ethan Furman
John Bokma wrote: Ethan Furman writes: John Bokma wrote: Michael Torrie writes: On 08/01/2010 07:09 PM, John Bokma wrote: One thing that comes to mind is that it's much easier to distribute C libraries than C++ libraries. In the beginning of C++ there were programs that just converted

Re: Why is python not written in C++ ?

2010-08-03 Thread John Bokma
Ethan Furman writes: > John Bokma wrote: >> Michael Torrie writes: >> >>> On 08/01/2010 07:09 PM, John Bokma wrote: > One thing that comes to mind is that it's much easier to > distribute C libraries than C++ libraries. In the beginning of C++ there were programs that just converted

Re: Why is python not written in C++ ?

2010-08-03 Thread John Bokma
Carl Banks writes: > On Aug 3, 2:29 am, John Bokma wrote: [..] >> But they call both the C libraries in the same way. > > Go look at the original claim, the one that you responded to. "It's > much easier to distribute C libraries than C++ libraries." Yup, and if I read it correctly the claim

Re: Why is python not written in C++ ?

2010-08-03 Thread Paul Rubin
Grant Edwards writes: > There's no computing problem so simple that it can't be solved in a > complex and obtuse manner in C++. > > I know that's true of any language, but from what I've seen over the > years, it "more true" in C++. http://www.willamette.edu/~fruehr/haskell/evolution.html -- htt

Re: Why is python not written in C++ ?

2010-08-03 Thread Benjamin Kaplan
On Tue, Aug 3, 2010 at 10:44 AM, John Nagle wrote: > On 8/1/2010 5:36 PM, Roy Smith wrote: > >> In article<4c55fe82$0$9111$426a3...@news.free.fr>, >> candide wrote: >> >> Python is an object oriented langage (OOL). The Python main >>> implementation is written in pure and "old" C90. Is it for h

Re: Why is python not written in C++ ?

2010-08-03 Thread John Nagle
On 8/1/2010 5:36 PM, Roy Smith wrote: In article<4c55fe82$0$9111$426a3...@news.free.fr>, 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

Re: Why is python not written in C++ ?

2010-08-03 Thread Ethan Furman
John Bokma wrote: Michael Torrie writes: On 08/01/2010 07:09 PM, John Bokma wrote: One thing that comes to mind is that it's much easier to distribute C libraries than C++ libraries. In the beginning of C++ there were programs that just converted C++ to C (frontends). At least that is how th

Re: Why is python not written in C++ ?

2010-08-03 Thread Carl Banks
On Aug 3, 2:29 am, John Bokma wrote: > Carl Banks writes: > > On Aug 1, 6:09 pm, John Bokma wrote: > >> Roy Smith writes: > >> > In article <4c55fe82$0$9111$426a3...@news.free.fr>, > >> >  candide wrote: > > >> >> Python is an object oriented langage (OOL). The Python main > >> >> implementati

Re: Why is python not written in C++ ?

2010-08-03 Thread Grant Edwards
On 2010-08-02, Paul Rubin wrote: > Michael Torrie writes: >> Sometimes, C++ is just the right tool for the job, despite all its >> warts 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

Re: Why is python not written in C++ ?

2010-08-03 Thread Grant Edwards
On 2010-08-02, Aahz wrote: > In article , > Peter wrote: >>On Aug 3, 7:42=A0am, Mark Lawrence wrote: >>> On 02/08/2010 00:08, candide 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 >>> t

Re: Why is python not written in C++ ?

2010-08-03 Thread Paul Rubin
Nobody writes: > One feature which can't readily be implemented in C is the automatic > clean-up side of the RAII idiom. I once did that by having an explicit stack of finalization records linked through the call stack. The "throw" routine would traverse the links to call the finalizers, until i

Re: Why is python not written in C++ ?

2010-08-03 Thread Nobody
On Tue, 03 Aug 2010 18:48:24 +1000, James Mills wrote: >> One feature which can't readily be implemented in C is the automatic >> clean-up side of the RAII idiom. > > C is a Turing-Complete Language is it not ? > > If so, therefore is it not true "anything" can be implemented ? > Even the "autom

Re: Why is python not written in C++ ?

2010-08-03 Thread John Bokma
Michael Torrie writes: > On 08/01/2010 07:09 PM, John Bokma wrote: >>> One thing that comes to mind is that it's much easier to distribute C >>> libraries than C++ libraries. >> >> In the beginning of C++ there were programs that just converted C++ to C >> (frontends). At least that is how the

Re: Why is python not written in C++ ?

2010-08-03 Thread John Bokma
Albert Hopkins writes: > But I wonder if someone has/has tried to write a programming language in > C++ and what were their experiences. The Low Level Virtual Machine (LLVM) is a compiler infrastructure, written in C++, which is designed for compile-time, link-time, run-time, and "idle-tim

Re: Why is python not written in C++ ?

2010-08-03 Thread John Bokma
Carl Banks writes: > On Aug 1, 6:09 pm, John Bokma wrote: >> Roy Smith writes: >> > In article <4c55fe82$0$9111$426a3...@news.free.fr>, >> >  candide wrote: >> >> >> Python is an object oriented langage (OOL). The Python main >> >> implementation is written in pure and "old" C90. Is it for his

Re: Why is python not written in C++ ?

2010-08-03 Thread James Mills
On Tue, Aug 3, 2010 at 7:04 PM, Steven D'Aprano wrote: > True, but Nobody said it can't *readily* be implemented, not that it > can't be. So he did too :) I read that as "really" :/ --James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/pyth

Re: Why is python not written in C++ ?

2010-08-03 Thread Steven D'Aprano
On Tue, 03 Aug 2010 18:48:24 +1000, James Mills wrote: > On Tue, Aug 3, 2010 at 6:36 PM, Nobody wrote: >> One feature which can't readily be implemented in C is the automatic >> clean-up side of the RAII idiom. > > C is a Turing-Complete Language is it not ? > > If so, therefore is it not true

Re: Why is python not written in C++ ?

2010-08-03 Thread James Mills
On Tue, Aug 3, 2010 at 6:36 PM, Nobody wrote: > One feature which can't readily be implemented in C is the automatic > clean-up side of the RAII idiom. C is a Turing-Complete Language is it not ? If so, therefore is it not true "anything" can be implemented ? Even the "automated clean-up side of

Re: Why is python not written in C++ ?

2010-08-03 Thread Chris Rebert
On Tue, Aug 3, 2010 at 1:36 AM, Nobody wrote: > On Mon, 02 Aug 2010 15:18:30 -0700, sturlamolden 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

Re: Why is python not written in C++ ?

2010-08-03 Thread Nobody
On Mon, 02 Aug 2010 15:18:30 -0700, sturlamolden 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. One feature which can't readily be implemente

Re: Why is python not written in C++ ?

2010-08-03 Thread Nobody
On Mon, 02 Aug 2010 17:17:35 -0700, Peter wrote: > But I always used to tell > people - by the time I got a program to compile then I figured 99% of > the bugs were already discovered! Try that with C/C++ or almost any > other language you care to name :-) ML and Haskell are also quite good for t

Re: Why is python not written in C++ ?

2010-08-02 Thread Aahz
In article <2b473423-0a22-4f4d-943f-31ea2d602...@z10g2000yqb.googlegroups.com>, sturlamolden wrote: > >And since this is comp.lang.python, I'll add in that this sometimes >applies to Python as well. Python, like C++, can have the call stack >rewinded by an exception. If we call some raw OS resour

Re: Why is python not written in C++ ?

2010-08-02 Thread Aahz
In article , Roy Smith wrote: >In article , a...@pythoncraft.com (Aahz) >wrote: >> >> http://www.netfunny.com/rhf/jokes/98/May/stroustrup.html > >The same story has been floating around for eons, just with the names >changed. I saw one where Wirth was ostensibly making fun of the people >who

Re: Why is python not written in C++ ?

2010-08-02 Thread Roy Smith
In article <7d95c0d3-718d-4958-9364-263c833f1...@i24g2000yqa.googlegroups.com>, sturlamolden wrote: > On 3 Aug, 02:47, Roy Smith wrote: > > > This one I don't understand.  Yes, I get RAII, but surely there are > > valid reasons to allocate memory outside of constructors.  Containers > > which

Re: Why is python not written in C++ ?

2010-08-02 Thread sturlamolden
On 3 Aug, 04:03, sturlamolden wrote: > struct File { >     std::FILE *fid; >     File(const char *name) { >         // acquire resource in constructor >         fid = std::fopen(name); >         if (!fid) throw some_exception; >     } >     ~File() { >         // free resource in destructor >    

Re: Why is python not written in C++ ?

2010-08-02 Thread sturlamolden
On 3 Aug, 02:47, Roy Smith wrote: > This one I don't understand.  Yes, I get RAII, but surely there are > valid reasons to allocate memory outside of constructors.  Containers > which resize themselves (such as std::vector) are one obvious example. That is because an exception might skip an arbi

Re: Why is python not written in C++ ?

2010-08-02 Thread Roy Smith
In article , a...@pythoncraft.com (Aahz) wrote: > http://www.netfunny.com/rhf/jokes/98/May/stroustrup.html The same story has been floating around for eons, just with the names changed. I saw one where Wirth was ostensibly making fun of the people who didn't understand that Pascal was all jus

Re: Why is python not written in C++ ?

2010-08-02 Thread Roy Smith
In article <0ed1fb16-87cb-4fb9-85b2-08d876445...@q22g2000yqm.googlegroups.com>, sturlamolden wrote: > The typical examples revealing incompetence are use of > new[] instead of std::vector To be fair, there were usable C++ compilers before there were usable STL implementations. Thus, it shoul

Re: Why is python not written in C++ ?

2010-08-02 Thread Paul Rubin
sturlamolden writes: > It is annyingly verbose, reminds me of Pascal (I hate the looks of > it), and is rumoured to produce slow bloatware. The earliest Ada compilers were terrible, but they are about like C compilers now, so the output code is ok (see Alioth shootout for example). I agree abou

Re: Why is python not written in C++ ?

2010-08-02 Thread Peter
On Aug 3, 8:27 am, Paul Rubin wrote: ... > > Certain folks in the functional-programming community consider OO to be > a 1980's or 1990's approach that didn't work out, and that what it was > really trying to supply was polymorphism.  C++ programs these days > apparently tend to use template-based

Re: Why is python not written in C++ ?

2010-08-02 Thread Carey Tilden
On Mon, Aug 2, 2010 at 3:18 PM, sturlamolden wrote: > > Perl is written in C++. That is not enough to make me want to use > it ;) I realize this was meant to be funny, but it's not true, and detracts from the point you were trying to make. Maybe skip the pointless jabs at Perl and stick to thing

Re: Why is python not written in C++ ?

2010-08-02 Thread Christian Heimes
Am 03.08.2010 01:03, schrieb Aahz: > http://www.netfunny.com/rhf/jokes/98/May/stroustrup.html I don't understand why the URL contains the word "joke". Every word is true. Hell yeah! :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-02 Thread sturlamolden
On 3 Aug, 01:37, Mark Lawrence wrote: > A bug is a bug is a bug? According to Grace Hopper, a bug might be a moth, in which case the best debugger is a pair of forceps. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is python not written in C++ ?

2010-08-02 Thread Mark Lawrence
On 03/08/2010 00:14, Martin Gregorie wrote: On Mon, 02 Aug 2010 15:54:52 -0700, sturlamolden wrote: On 3 Aug, 00:27, Paul Rubin wrote: Certain folks in the functional-programming community consider OO to be a 1980's or 1990's approach that didn't work out, and that what it was really trying

  1   2   >