python vs d

Brian Rogoff via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 29 10:05:47 PDT 2014


On Tuesday, 29 April 2014 at 14:01:44 UTC, logicchains wrote:
> As someone who only occasionally uses D and Python, I just 
> wanted to add as a datapoint that I find the D compilers an 
> order of magnitude more agreeable than the Python interpreter. 
> The thought that anybody could actually enjoy significant 
> whitespace baffles me.

You must be perpetually perplexed then, because Haskell, Clean, 
F#, Nimrod and many other languages also use whiitespace to 
signify indentation.

The argument is roughly like this: if we accept that it would be 
a good thing if there was a universal indentation/code formatting 
standard that everyone followed (like gofmt for Go) then 
punctuation is redundant and the remaining question is whether 
the added punctuation helps or hinders readability on the whole. 
I'm guessing you find the lack of punctuation to hinder 
readability. I find that the opposite is true, and so enjoy 
reading such code more.

I'm also a frequent user of Python and my main issue with it is 
the lack of static typing, not the syntax. I'm a rather slapdash 
coder and I benefit greatly from a type system that gets in my 
way. The same is true of most Lisps too; I'm fine with the 
syntax, but I suffer from the lack of static typing.

BTW, there is even a surface syntax for D2, 
https://github.com/pplantinga/delight, which uses indentation, 
though I have to say that I dislike the separation of function 
and procedure a lot.


More information about the Digitalmars-d mailing list