On Wednesday, 4 June 2014 at 20:10:51 UTC, Ary Borenszweig wrote:
On 6/4/14, 3:33 PM, Craig Dillabaugh wrote:
On Wednesday, 4 June 2014 at 17:31:56 UTC, Ary Borenszweig
wrote:
On 6/4/14, 1:27 PM, Meta wrote:
On Wednesday, 4 June 2014 at 06:19:05 UTC, Andrei
Alexandrescu wrote:
clip
But using function templates and the like you can still get
fairly
'Python-like' code in D. I find dealing with types to be one
of the
areas that requires the 'least' amount of mental effort in
software
development. I don't understand why people see 'untyped'
languages as
simpler for the most part.
I was actually talking about having to specify types
everywhere, like in function signatures, the fields of classes
and structs, etc.
You can still have a language that feels dynamic but is
statically typed. The compiler catches type-related bugs for
you, and you can prototype something very fast. Then you can
add type annotations (if you want). I wouldn't say this
language is 'untyped'.
One such language is Julia.
OK, but my point was that specifying the type (at least for me)
takes an insignificant amount of time (and is very useful months
down the road when I am looking at the code, trying to figure out
what it is supposed to do).
When declaring a variable, in almost every case, figuring out the
proper type, and writing that type takes a fraction of a second.
I brought up templates because I figured one objection to my
claim would be that it is easier to write functions in Python
because you don't have to specify a type. D templates take a bit
more work, but for simple tasks (like you would commonly have in
a scripting situtation) they should be about as simple as their
Python equivalents.