Page Summary
Active Entries
- 1: Interesting Links for 09-05-2026
- 2: Photo cross-post
- 3: Interesting Links for 08-05-2026
- 4: Interesting Links for 06-05-2026
- 5: Life with no children: Art And Tidiness
- 6: Photo cross-post
- 7: Interesting Links for 03-05-2026
- 8: Interesting Links for 29-04-2026
- 9: Photo cross-post
- 10: Photo cross-post
Style Credit
- Style: Neutral Good for Practicality by
Expand Cut Tags
No cut tags
no subject
Date: 2009-11-11 12:13 pm (UTC)Personally, I am not sure whether it would be great or a hassle. I am awfully fond of strong typing - but immensely irritated at times by what seem unnecessary casts...
Does 4.0 do it?
no subject
Date: 2009-11-11 12:26 pm (UTC)Let's say you have an interface IClickable that specifies a void Click() method and a class Button with a void Click() method on it, then there's no reason why a smart compiler couldn't accept that Button can be passed as an IClickable even if its declaration doesn't mention that it implements that interface.
It'd be a bit slower than just checking the list of implemented interfaces, but it could still be done.
4.0 allows you to do it weakly - using dynamic - which uses reflection to make the call under the covers. But you lose your static typing that way.
no subject
Date: 2009-11-11 12:30 pm (UTC)Should make mock types a lot easier to use.