LWN.net Logo

Pythron

Pythron

Posted Dec 11, 2008 16:30 UTC (Thu) by rriggs (subscriber, #11598)
In reply to: Pythron by elanthis
Parent article: Python 3.0 released

(It's true that a lot of C++ code kept breaking with each g++ release, but that's because g++ kept dropping support for broken code that it used to accept; totally g++'s fault and the fault of people who can't seem to comprehend C++, which is _not_ as hard as some detractors claim it is.)
Bullpucky!

From Scott Meyers, hardly a C++ detractor:

"… C++ developers could really use a larger tool set, but the barrier to entry for truly powerful tools is the ability to parse C++ source code, and that’s a barrier very few have been able to breach. "
C++ is nearly impossible to parse, primarily because it continues to rely on the C preprocessor.

I develop in Python and in C++. C++ certainly has its uses. But crappy syntax and a standard library that can't hold a candle to most other modern languages are its two biggest faults.


(Log in to post comments)

Pythron

Posted Dec 11, 2008 23:42 UTC (Thu) by nix (subscriber, #2304) [Link]

C++ is nearly impossible to parse, primarily because it continues to rely on the C preprocessor.
I've written a C++ parser, and, believe me, the C preprocessor can be almost completely ignored: it doesn't make anything harder. It is *not* the problem. The rampant context-sensitivity is the problem. A trivial example that everyone knows: is

A foo (b);

a declaration of a variable 'foo' of type 'A', and its initialization via a single-argument constructor, passing the variable 'b', or a declaration of a function 'foo' taking a single parameter of type 'b' and returning an 'A'?

To answer that you have to know if 'b' is a type or not at that point in the program *at parsing time*.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds