On 14/09/2006, at 12:18 PM, O Plameras wrote:
On 14/09/2006, at 11:22 AM, O Plameras wrote:
You've said "let's overload plus for time to mean we add a whole
day".
Andre and myself have said "picking 'one day' for what adding an
integer to
a time means is arbitraty and unobvious to anyone but the person
who first
decided it."
Then ask, if unobvious; don't jump to conclusions.
This is exactly _why_ your code is bad. Writing
time+1
Are you forgetting that the post was in response within a 'thread'
of 'overloading' ?
The discussion expanded from problems with overloading to value
judgements about whether code is good or bad. You were the one who
introduced that topic; I responded.
[re Guido van Rossum] I don't think it is ethical or professional
on your part to mention his name in the first place because the
chances for him to clarify his position, right or wrong, is
extremely remote.
OK, since you perked my interest in hunting down the interview where
he erred, here it is:
http://www.artima.com/intv/strongweak.html
So, this is in January 2003. First, the interviewer, asks:
Josh Bloch continued, "There's no doubt that you can prototype
more quickly in an environment that lets you get away with murder at
compile time, but I do think the resulting programs are less robust.
I think that to get the most robust programs, you want to do as much
static type checking as possible."
Note that the phrase "static typing" is explicitly used in the
question. Guido then goes on to respond with the phrase "strong
typing" rather than "static typing":
That attitude sounds like the classic thing I've always heard from
strong-typing proponents. The one thing that troubles me is that all
the focus is on the strong typing, as if once your program is type
correct, it has no bugs left. Strong typing catches many bugs, but it
also makes you focus too much on getting the types right and not
enough on getting the rest of the program correct.
It's obvious that Guido didn't know _jack_ about type systems when he
wrote that article. He even goes on to say:
And all the strong typing goes out the door the moment you say,
"Well, we're just going to write a container of Objects, and you'll
have to cast them back to whatever type they really are once you
start using them."
Even after correcting him to say "static typing" rather than "strong
typing", he's still just plain wrong. One driving reason that C++
templates was created was to _address that exact problem_, so that
you don't have to explicitly downcast the types when you pull them
out of a container. (He even mentions C++ templates in the next
paragraph of the interview, so he knows of their existence, but he
appears to not know how to use them!) Parameterised types existed in
programming language research for decades before Python was a figment
of Guido's imagination. And, since there's nothing like code to
drive the point home, here's some C++ for Guido to chew on:
std::vector<int> v;
v.push_back(69);
const int number_retrieved_from_vector = v[0]; // Look, no downcast!
That's strongly typed and statically typed.
Look, Guido van Rossum is a programming language designer. If he
does not know his programming language theory well enough to properly
distinguish between static typing and strong typing, I think it's
fine for me to make a judgement call to say "he doesn't know his
programming language theory". If you call that unethical,
unprofessional and disparaging, then it seems we have different
definitions of those words.
--
% Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/>
_______________________________________________
coders mailing list
coders@slug.org.au
http://lists.slug.org.au/listinfo/coders