8,732 reputation
33154
bio website
location Waco, TX
age 28
visits member for 3 years, 7 months
seen 10 hours ago
My native language is C++, but I have left my first love and now use python whenever I have the slightest excuse. Actually, I use python even if I don't have an excuse.

Apr
10
comment Dynamically vs Statically typed languages studies
chat.stackexchange.com/rooms/13863/winstonewert-and-giorgio
Apr
5
comment Dynamically vs Statically typed languages studies
@Giorgio, actually, if you're interested I'd be game to try an experiment where we pick something and both develop the same project in our preferred language and compare notes.
Apr
5
comment Dynamically vs Statically typed languages studies
@Giorgio, but ultimately the point of my question here was to see whether actual studies exist on programmer productivity and defect rates regarding the typing issue. There are lots of people who have opinions and arguments, but there is a great lack of data. I think you can only hope to settle this question with data.
Apr
5
comment Dynamically vs Statically typed languages studies
@Giorgio, so the extra checking tests that you mention are typically just not written in python. The question is whether or not defects in the code arise as a result. My experience has been that for the most part, I catch incorrect types being passed during unit testing, and the problem is trivial to find. i.e. I don't find these types of errors escaping to production and they types of errors don't generate hard to find bugs.
Apr
5
comment Dynamically vs Statically typed languages studies
@Giorgio, the usual practice in Python is not to be concerned about the behavior of functions when passed incorrect types. You are writing extra tests because you are worried about what foo does when passed the incorrect type. Typically, Python coders only test the cases with correct types. So a Python coder wouldn't add a check to foo for list types, and wouldn't test the behavior of foo for anything that wasn't a list. You appear to be trying to get python to act more like a statically typed language which naturally requires much more code/testing.
Apr
1
comment Dynamically vs Statically typed languages studies
In your example, was the bug merely that def foo(x) accept a string without complaint? Or did that actual cause a bug elsewhere?
Apr
1
comment Dynamically vs Statically typed languages studies
@Giorgio, ah. My experience is with comparing C++/Java to Python. Haskell, as I understand it, is quite different in that it catches many more errors and requires less busy-work to please than C++ or Java. So I'd be willing to believe that Haskell might change the game in favor of static typing.
Mar
31
comment Dynamically vs Statically typed languages studies
@Giorgio, actually, that doesn't match my experience. I write pretty much the same tests in both dynamic and statically typed languages. I'm actually curious, what kinds of extra tests do you find yourself writing in dynamic languages?
Mar
31
comment Dynamically vs Statically typed languages studies
@Giorgio, I think the critical point isn't when the compiler accepts my code, but when it passes my unit tests. At that point I find little difference in terms of the chance that my program is correct.
Mar
26
answered Why isn't java used as a build language?
Mar
25
comment How to implement a Weighted shuffle
@MichaelT, I'd like to help, but I'd need more information on where you are lost. Do you understand the first paragraph's explanation? Are you familiar with python? Do you know what they key parameter does?
Mar
25
answered How to implement a Weighted shuffle
Mar
9
awarded  Nice Question
Feb
22
comment What's the simplest example out there to explain the difference between Parse Trees and Abstract Syntax Trees?
@Ingo, I was being a bit silly with that, as I said I was in an odd mood.
Feb
22
comment What's the simplest example out there to explain the difference between Parse Trees and Abstract Syntax Trees?
@ingo, docs.google.com/document/d/…
Feb
21
comment What's the simplest example out there to explain the difference between Parse Trees and Abstract Syntax Trees?
@Ingo, en.wikipedia.org/wiki/Abstract_syntax_tree and en.wikipedia.org/wiki/Concrete_syntax_tree.
Feb
20
comment What's the simplest example out there to explain the difference between Parse Trees and Abstract Syntax Trees?
How is this an answer to the question?
Feb
20
comment What's the simplest example out there to explain the difference between Parse Trees and Abstract Syntax Trees?
@Ingo, nothing in my answer has anything to say about when a compiler throws away parentheses. It asking what the difference is between a concrete parse tree and an abstract parse tree.
Feb
20
revised What's the simplest example out there to explain the difference between Parse Trees and Abstract Syntax Trees?
deleted 1 characters in body
Feb
3
comment Should unit-tests be entirely self-contained?
@Aaronaught, regarding the examples, what if I wrote my own money or collection class? Would you think I should mock those?