Sorry John, “Interfaces is not something about subtypes” is only your idea, and it looks very strange to me.
If you’re a Lisp guy, then “SICP” must be some kind of authoroty to you. Please see chapter 2, on data. As for me, it clearly defines data type as a set of values and (nb) operations.
If an operation of that type can be applied to object, it is of that type. This means .NET interfaces are absolutely data types.
John, generally, I’d appreciate if you were more polite.
I clearly see that you didn’t read the post attentively: I state that it is an explicit implementation and gave a descrition to it.
Same about closures: did you see the words “Please note variables visibility scope”? This is the essence of the post’s message, and it is clearly identified.
5 Comments
Usually this is called functor and function application, mapping (Lisp). Closure is usually something else 🙂
Guy,
try to study .NET Framework first.
You are using explicit interface implementation, look here:
http://msdn2.microsoft.com/en-us/library/aa288461(VS.71).aspx
P.S. Interfaces is not something about subtypes, so
Liskov principle is not applicable. Bu-ga-ga!
Sorry John, “Interfaces is not something about subtypes” is only your idea, and it looks very strange to me.
If you’re a Lisp guy, then “SICP” must be some kind of authoroty to you. Please see chapter 2, on data. As for me, it clearly defines data type as a set of values and (nb) operations.
If an operation of that type can be applied to object, it is of that type. This means .NET interfaces are absolutely data types.
John,
You must have meant this one in first comment: https://victorsergienko.com/cs-java-closures/
If you have something to argue against the definition “closure is a function that is evaluated in an environment containing one or more bound variables. When called, the function can access these variables”, I’d gladly hear it, or you can argue against it on Wikipeia discussion page.
John, generally, I’d appreciate if you were more polite.
I clearly see that you didn’t read the post attentively: I state that it is an explicit implementation and gave a descrition to it.
Same about closures: did you see the words “Please note variables visibility scope”? This is the essence of the post’s message, and it is clearly identified.
Post a Comment