?

Log in

Feb. 16th, 2017 @ 10:01 pm Duck Typing
Tags: ,
I like the principle of duck typing.

Roast it if it looks sufficiently duck-like. Don't worry about whether it's officially a duck, just if it has the relevant features for roasting.

However, I don't understand the attachment to getting 3/4 of the way through the basting, stuffing and roasting project before suddenly discovering that you're trying to crisp a small piece of vaguely duck-shaped ornamental stonemasonry.

I agree with (often) only testing for the *relevant* features of duck-ness. But it seems like the best time to test for those relevant features is "as soon as possible", not "shut your eyes, and charge ahead until you fail". Is there a good reason for "fail fast, except for syntax errors, those we should wait to crash until we're actually trying to execute them"?

I've been working on my non-vegetarian metaphors, how did I do? :)

You can also comment at http://jack.dreamwidth.org/1017576.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
[User Picture Icon]
From:ghoti
Date:February 17th, 2017 11:18 am (UTC)
(Permanent Link)
Non-vegetarian metaphors - well, I have no idea what you're talking about, but I often don't understand your programming posts.