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 | 6456 reads
|
Browse archives
Active forum topics |
Recent comments
32 weeks 6 days ago
32 weeks 6 days ago
32 weeks 6 days ago
1 year 3 weeks ago
1 year 7 weeks ago
1 year 8 weeks ago
1 year 8 weeks ago
1 year 11 weeks ago
1 year 16 weeks ago
1 year 16 weeks ago