should i learn it first ?

Christopher Browne cbbrowne at acm.org
Sun Mar 10 19:21:08 EST 2002


In an attempt to throw the authorities off his trail, philh at comuno.freeserve.co.uk (phil hunt) transmitted:
> On 10 Mar 2002 10:15:06 -0800, Aahz Maruch <aahz at panix.com> wrote:
>>In article <slrna8mogf.6ek.philh at comuno.freeserve.co.uk>,
>>phil hunt <philh at comuno.freeserve.co.uk> wrote:
>>>On Sat, 09 Mar 2002 22:57:42 -0500, Peter Hansen <peter at engcorp.com> wrote:
>>>>
>>>>I agree with much of what you say, especially the "consider skipping
>>>>C++ and just learn C part", but _what_ pragmatic point of view is it
>>>>that has one learning Perl, Java, or C++ when one uses Python already?
>>>>Not dissing those languages, but when would you really need them?
>>>
>>>I can think of several tasks for which C++ is better than Python, 
>>>e.g. writing operating systems, network stacks, windowing systems, 
>>>run-time interpreters, crypto algorithms, etc.
>>
>>But are there any tasks for which C++ (or C++/Python) is really better
>>than C/Python?
>
> Any task for whiich OO is useful, which means essentially all
> programs >5000 lines (and most smaller ones), will benefit from C++
> over C.

Would that include the implementation of runtime code for an
at-the-bare-iron OS kernel to support:
 a) vtables, and
 b) memory management?

Remember, when you're sitting at that level, you have no runtime
support code, and so can make no use of:
 - Virtual functions
 - Constructors
 - Destructors

I would tend to think that figuring out the usable subset of C++ would
become painful enough to discourage its use.

And this seems to be a factor strongly correlated with the relative
rarity of OS kernels written in C++ as compared to C, in which there
is little in the _language_ that requires runtime support...
-- 
(reverse (concatenate 'string "ac.notelrac.teneerf@" "454aa"))
http://www.ntlug.org/~cbbrowne/advocacy.html
Rules of the Evil Overlord  #150. "I will provide funding and research
to develop  tactical and  strategic weapons covering  a full  range of
needs  so my  choices are  not limited  to "hand  to hand  combat with
swords" and "blow up the planet"." <http://www.eviloverlord.com/>



More information about the Python-list mailing list