Difference between revisions of "Programming in D for Python Programmers"

From D Wiki
Jump to: navigation, search
Line 22: Line 22:
 
*[http://dlang.org/phobos/std_algorithm.html std.algorithm generic functions in Phobos]
 
*[http://dlang.org/phobos/std_algorithm.html std.algorithm generic functions in Phobos]
 
*[http://dlang.org/phobos/std_array.html std.array]
 
*[http://dlang.org/phobos/std_array.html std.array]
 +
 +
*[https://www.semitwist.com/articles/article/view/combine-coroutines-and-input-ranges-for-dead-simple-d-iteration Combining co-routines and input ranges for dead-simple iteration]
  
  

Revision as of 21:36, 29 March 2015

This section is under development, but in the meantime this link presents an independent perspective on D from the perspective of a python programmer:


AdRoll is known for their use of Python elsewhere, but their data scientists use D. According to Andrew Pascoe, senior data scientist at AdRoll, "[t]he key thing here that separates D from other efficient languages like the oft-suggested C or C++ is that D frees you to program in the style you feel most comfortable with at the given time". He says that they have found that they "can rapidly prototype new infrastructure and analysis tasks, and when efficiency becomes a core concern, we have the ability to refactor that same code base to squeeze as much performance out as possible".


Python's generators and list comprehensions have been thought to be two of the most difficult concepts to replicate in other languages. For the D solution to the problem solved by Python generators, see D Ranges and lazy evaluation. For list comprehensions, see UFCS.


Parallel programming has become increasingly in focus as we approach the beginning of the end of the free lunch from Moore's Law. D makes multiprocessing and threading as simple as possible, but not simpler: