How to imporve D-translation of these Python list comprehensions ?

Russel Winder russel at winder.org.uk
Thu Feb 1 11:59:23 UTC 2018


On Mon, 2018-01-15 at 21:13 +0000, lobo via Digitalmars-d-learn wrote:
> On Monday, 15 January 2018 at 19:05:52 UTC, xenon325 wrote:
> > A workmate has recently shown this piece of code to show how 
> > nice Python is (we are mostly C and growing C++ shop):
> > 
> > [...]
> 
> Well if that is what they can do in Python I'd hate to see their 
> C++! They have done a great job making Python code read like 
> Perl. This looks like something you'd see in an assignment at 
> uni; "Decipher this Python code and port to your language of 
> choice" :)

Apart from the slur on Perl, I have to agree with this. Using a
dreadful bit of Python code is the start of a downward spiral of
expectation and programming in other languages.

As noted earlier, I am working on a nicer rendering of this algorithm,
and will be happy to share if people are interested.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20180201/e73f5942/attachment.sig>


More information about the Digitalmars-d-learn mailing list