dynamic classes and duck typing

Pelle Månsson pelle.mansson at gmail.com
Tue Dec 1 23:47:16 PST 2009


retard wrote:
> Tue, 01 Dec 2009 14:22:10 -0800, Walter Bright wrote:
> 
>> bearophile wrote:
>>> Right. But what people care in the end is programs that get the work
>>> done. If a mix of Python plus C/C++ libs are good enough and handy
>>> enough then they get used. For example I am able to use the PIL Python
>>> lib with Python to load, save and process jpeg images at high-speed
>>> with few lines of handy code. So I don't care if PIL is written in C++:
>>> http://www.pythonware.com/products/pil/
>> Sure, but that's not about the language. It's about the richness of the
>> ecosystem that supports the language, and Python certainly has a rich
>> one.
> 
> I thought D was supposed to be a practical language for real world 
> problems. This 'D is good because everything can and must be written in 
> D' is beginning to sound like a religion. To me it seems the Python way 
> is more practical in all ways. Even novice programmers can produce 
> efficient programs with it by using a mixture of low level C/C++ libs and 
> high level python scripts.
> 
> I agree that Python isn't as fast as D and it lacks type safety things 
> and so on, but in the end of day the Python coder gets the job done while 
> the D coder still fights with inline assembler, compiler bugs, porting 
> the app, fighting the type system (mostly purity/constness issues). 
> Python has more libs available, you need to write less code to implement 
> the same functionality and it's all less troublesome because the lack of 
> type annotations. So it's really understandable why a greater amount 
> people favor Python.
You don't actually have to use pure, const, inline assembler, etc. D is 
a wonderful language to just do string-and-hashtable code in. All the 
other features are there to help bigger projects (contracts, yay!) or 
projects with special needs (I for one have never needed inline ASM).



More information about the Digitalmars-d mailing list