User loginNavigation |
Random "if it bends it is funny, if it breaks it isn't funny" line of thoughtI was wondering how something like duck typing might work in C# or Java (there are other strict languages which do support duck typing, O'Caml for instance). Seems like you would have to have lots of interfaces and then list them when implementing them. Basically every public method would have an interface describing it, and then each class would laboriously list all those interfaces. Actually it all falls apart because I don't think one can say a method takes a set of interfaces for a single parameter. You would have to automatically generate the combinatorical set of interface mixins, and use those in the method signitures. (Just musing over the range of things one could - not particularly want to - do with the way Java/C# are already defined.) By raould at 2006-11-10 23:15 | LtU Forum | previous forum topic | next forum topic | other blogs | 6312 reads
|
Browse archives
Active forum topics
|
Recent comments
14 weeks 1 day ago
18 weeks 3 days ago
20 weeks 1 day ago
20 weeks 1 day ago
22 weeks 5 days ago
27 weeks 3 days ago
27 weeks 3 days ago
27 weeks 6 days ago
27 weeks 6 days ago
30 weeks 4 days ago