Click here to Skip to main content
12,246,601 members (54,173 online)

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy except programming questions.

Technical discussions are encouraged, but click here to ask your programming question.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralRe: CCC 6/1/14 Pin
Tom Lawton6-Jan-14 0:15
memberTom Lawton6-Jan-14 0:15 
GeneralRe: CCC 6/1/14 Pin
pkfox6-Jan-14 0:21
memberpkfox6-Jan-14 0:21 
GeneralRe: CCC 6/1/14 Pin
Tom Lawton6-Jan-14 0:31
memberTom Lawton6-Jan-14 0:31 
GeneralRe: CCC 6/1/14 Pin
pkfox6-Jan-14 0:33
memberpkfox6-Jan-14 0:33 
GeneralRe: CCC 6/1/14 Pin
pkfox6-Jan-14 0:34
memberpkfox6-Jan-14 0:34 
GeneralRe: CCC 6/1/14 Pin
Nagy Vilmos6-Jan-14 0:46
professionalNagy Vilmos6-Jan-14 0:46 
GeneralRe: CCC 6/1/14 Pin
Tom Lawton6-Jan-14 0:56
memberTom Lawton6-Jan-14 0:56 
GeneralRe: CCC 6/1/14 Pin
pkfox6-Jan-14 1:09
memberpkfox6-Jan-14 1:09 
GeneralMQOTD Pin
V.5-Jan-14 22:38
professionalV.5-Jan-14 22:38 
GeneralRe: MQOTD Pin
Nagy Vilmos5-Jan-14 22:41
professionalNagy Vilmos5-Jan-14 22:41 
GeneralRe: MQOTD Pin
OriginalGriff5-Jan-14 23:06
protectorOriginalGriff5-Jan-14 23:06 
GeneralRe: MQOTD Pin
CBadger6-Jan-14 1:01
professionalCBadger6-Jan-14 1:01 
GeneralRe: MQOTD Pin
djj556-Jan-14 3:52
professionaldjj556-Jan-14 3:52 
GeneralDuck typing Pin
Marco Bertschi5-Jan-14 21:43
professionalMarco Bertschi5-Jan-14 21:43 
In computer programming with object-oriented programming languages, duck typing is a style of typing in which an object's methods and properties determine the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface.


An interesting read, but something remains unclear to me: Why would you want to have something like

class Duck
{
  public void Quack() { ... }
  public void Walk() { ... }
}
class OtherDuck
{
  public void Quack() { ... }
  public void Walk() { ... }
}
...
void M(Duck bird)
{
  bird.Quack();
  bird.Walk();
}
...
M(new Duck()); // Legal
M(new OtherDuck()); // Illegal

rather than have and inherit from an interface ?
To me Duck Typing seems some [to be]* form of Duct Taping (I'll admit it: Pun intended).

* Fixed Typo - I forgot 'to be' in there.
Veni, vidi, caecus | Everything summarizes to Assembly code


modified 6-Jan-14 3:55am.

GeneralRe: Duck typing Pin
Kornfeld Eliyahu Peter5-Jan-14 22:11
professionalKornfeld Eliyahu Peter5-Jan-14 22:11 
GeneralRe: Duck typing Pin
Nagy Vilmos5-Jan-14 22:40
professionalNagy Vilmos5-Jan-14 22:40 
GeneralRe: Duck typing Pin
CBadger5-Jan-14 22:40
professionalCBadger5-Jan-14 22:40 
GeneralRe: Duck typing Pin
BillWoodruff5-Jan-14 22:57
memberBillWoodruff5-Jan-14 22:57 
GeneralRe: Duck typing Pin
Gjeltema6-Jan-14 5:13
memberGjeltema6-Jan-14 5:13 
AnswerRe: Duck typing Pin
Pablo Aliskevicius5-Jan-14 23:58
memberPablo Aliskevicius5-Jan-14 23:58 
GeneralRe: Duck typing Pin
peterchen6-Jan-14 1:13
memberpeterchen6-Jan-14 1:13 
GeneralRe: Duck typing Pin
Shameel6-Jan-14 0:09
memberShameel6-Jan-14 0:09 
GeneralRe: Duck typing Pin
John Atten6-Jan-14 5:14
memberJohn Atten6-Jan-14 5:14 
GeneralRe: Duck typing Pin
Roger Wright6-Jan-14 9:58
memberRoger Wright6-Jan-14 9:58 
GeneralSR-71 pron! Get in and take a look around! PinPopular
Dave Kreskowiak5-Jan-14 9:21
mvpDave Kreskowiak5-Jan-14 9:21 
GeneralRe: SR-71 pron! Get in and take a look around! Pin
Mike Hankey5-Jan-14 10:22
memberMike Hankey5-Jan-14 10:22 
GeneralRe: SR-71 pron! Get in and take a look around! Pin
Member 41945935-Jan-14 11:32
memberMember 41945935-Jan-14 11:32 
General":@#^%^#$ cars Pin
Erudite_Eric5-Jan-14 7:52
memberErudite_Eric5-Jan-14 7:52 
GeneralRe: ":@#^%^#$ cars Pin
Ron Anders5-Jan-14 8:56
memberRon Anders5-Jan-14 8:56 
GeneralRe: ":@#^%^#$ cars Pin
Chris Maunder5-Jan-14 18:04
adminChris Maunder5-Jan-14 18:04 
GeneralRe: ":@#^%^#$ cars Pin
Erudite_Eric5-Jan-14 19:57
memberErudite_Eric5-Jan-14 19:57 
GeneralRe: ":@#^%^#$ cars Pin
Chris Maunder6-Jan-14 6:17
adminChris Maunder6-Jan-14 6:17 
General5-0 whitewash. Pin
Septimus Hedgehog5-Jan-14 6:20
memberSeptimus Hedgehog5-Jan-14 6:20 
GeneralRe: 5-0 whitewash. Pin
Vikram A Punathambekar5-Jan-14 7:29
memberVikram A Punathambekar5-Jan-14 7:29 
GeneralRe: 5-0 whitewash. Pin
Abhinav S5-Jan-14 7:40
mvpAbhinav S5-Jan-14 7:40 
GeneralRe: 5-0 whitewash. Pin
Abhinav S5-Jan-14 7:42
mvpAbhinav S5-Jan-14 7:42 
GeneralRe: 5-0 whitewash. Pin
Mike-MadBadger5-Jan-14 10:04
memberMike-MadBadger5-Jan-14 10:04 
GeneralRe: 5-0 whitewash. Pin
CHill605-Jan-14 13:28
mvpCHill605-Jan-14 13:28 
GeneralRe: 5-0 whitewash. Pin
_Josh_5-Jan-14 15:50
member_Josh_5-Jan-14 15:50 
GeneralRe: 5-0 whitewash. Pin
Septimus Hedgehog6-Jan-14 0:24
memberSeptimus Hedgehog6-Jan-14 0:24 
GeneralRe: 5-0 whitewash. Pin
Bergholt Stuttley Johnson6-Jan-14 1:14
memberBergholt Stuttley Johnson6-Jan-14 1:14 
GeneralFresh from Jabba's aquarium, the epitome of aquatic beauty ! Pin
BillWoodruff5-Jan-14 5:09
memberBillWoodruff5-Jan-14 5:09 
GeneralRe: Fresh from Jabba's aquarium, the epitome of aquatic beauty ! Pin
_Maxxx_5-Jan-14 12:58
professional_Maxxx_5-Jan-14 12:58 
GeneralRe: Fresh from Jabba's aquarium, the epitome of aquatic beauty ! Pin
BillWoodruff5-Jan-14 16:55
memberBillWoodruff5-Jan-14 16:55 
GeneralRe: Fresh from Jabba's aquarium, the epitome of aquatic beauty ! Pin
JimmyRopes5-Jan-14 19:53
memberJimmyRopes5-Jan-14 19:53 
GeneralRe: Fresh from Jabba's aquarium, the epitome of aquatic beauty ! Pin
BillWoodruff5-Jan-14 22:30
memberBillWoodruff5-Jan-14 22:30 
GeneralRe: Fresh from Jabba's aquarium, the epitome of aquatic beauty ! Pin
JimmyRopes6-Jan-14 3:06
memberJimmyRopes6-Jan-14 3:06 
GeneralRe: Fresh from Jabba's aquarium, the epitome of aquatic beauty ! Pin
_Maxxx_5-Jan-14 20:27
professional_Maxxx_5-Jan-14 20:27 
GeneralRe: Fresh from Jabba's aquarium, the epitome of aquatic beauty ! Pin
BillWoodruff5-Jan-14 22:39
memberBillWoodruff5-Jan-14 22:39 
GeneralAnyone else using TopShelf? Pin
Septimus Hedgehog5-Jan-14 4:47
memberSeptimus Hedgehog5-Jan-14 4:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 2 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid