From: Albert van der Horst on 7 Aug 2010 11:13 In article <roy-2FC4E0.19455005082010(a)news.panix.com>, Roy Smith <roy(a)panix.com> wrote: >In article <i3e43n$v7c$4(a)lust.ihug.co.nz>, > Lawrence D'Oliveiro <ldo(a)geek-central.gen.new_zealand> wrote: > >> In message <roy-6BCFA7.22564104082010(a)news.panix.com>, 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 C and C++. But, they are very few. Calling C++ a superset >of C is essentially correct. One aspect of C++ is that all standard functions of C are called in the same way. A large part of programs consists of stringing API calls together. Those require little work to upgrade to C++. So from a practical point of view this is very much true. > >It is certainly correct from the level of a risk-averse development >manager deciding if he or she is willing to use C++ for the first time. >Fear of the unknown is a powerful deterrent. It's a lot easier to >accept something like C++ because "it's just a superset of C, and we've >been using C for years". Even if it is overhyped, the C++ compiler vendors certainly tried to make it happen. > >I suspect the same effect contributed to Java's success as well. "Look, >it's got curly braces and semicolons. It's just like C!" Of course! Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert(a)spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
From: Paul Rubin on 7 Aug 2010 18:37 Albert van der Horst <albert(a)spenarnc.xs4all.nl> 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 implements VHDL as logic gates. > (We went on whether Forth would be a suitable high level assembler > for Haskell. It would beat C++ -- not C -- for implementing Python, > that much I'm sure.) Haskell (or at least certain parts of it) should probably be implemented in Coq or Agda, which are even higher level than Haskell. > Undoubtedly C is the right choice to implement Python. Python has been experimentally implemented in Haskell: http://hackage.haskell.org/package/berp-0.0.2 but the most interesting implementation (not yet ready for production, but a serious ongoing project partly funded by the EU) is written in Python itself: http://codespeak.net/pypy/
From: Lawrence D'Oliveiro on 8 Aug 2010 06:44 In message <8c4g22F5ljU1(a)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 Apple's well-known multitasking problems. :)
From: Lawrence D'Oliveiro on 8 Aug 2010 06:45 In message <l6segt.nm9(a)spenarnc.xs4all.nl>, 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.
From: Ulrich Eckhardt on 9 Aug 2010 09:39
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 actually surprised that nobody mentioned that Python actually _is_ written in C++. Yes, it's restricted to a subset thereof that is compatible to C, but you could also claim that it was written in a subset of C compatible to C++. :) Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 |