Reputation
529
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 12
Newest
 Enlightened
Impact
~13k people reached

  • 0 posts edited
  • 0 helpful flags
  • 100 votes cast
Aug
29
asked What are the most common algorithms in the field of computational geometry?
Aug
27
answered Should a competent programmer be able to come up with his own shortest path algorithm?
Aug
13
comment Would you put your Stack Overflow profile link on your CV / Resume?
Yes; BUT he is... Jon Skeet. Not everyone is!
Aug
7
revised Why do interfaces require methods over members?
edited body
Aug
6
comment Why do interfaces require methods over members?
This is a good answer, in particular I found the information about function lookup informative. Thanks.
Aug
6
comment Why do interfaces require methods over members?
Thanks for this info about Objective-C!
Aug
6
comment Why do interfaces require methods over members?
Thank you, you've understood the thrust of my question and gotten into the gritty details of WHY. I had a hunch that speed would be one of the reasons -- as it always does when you head down the road of "more dynamic". As we are seeing now with languages like JS and Python, flexibility often trumps speed, so the "inertia" you mention towards certain language design trends based on (what was once necessary) optimisation slowly dissolves.
Aug
6
awarded  Scholar
Aug
6
accepted Why do interfaces require methods over members?
Aug
6
comment Why do interfaces require methods over members?
I must say, thinking about this further, I don't really agree about multiple inheritance. Because what I'm really asking about is whether a representation of data members in interfaces is possible, not whether you can use data members to construct interfaces (which is essentially a C++ abstract class). There is a key difference there.
Aug
6
comment Why do interfaces require methods over members?
Re C++, touché. However, actually there are interfaces in dynamic languages, JS and Python being two that immediately spring to mind. Whether a proponent of statically-typed languages would call these "interfaces", is a whole other discussion that I see no point in getting into. Personally I show little preference for either side of that fence, using as I do a broad range of languages to different purposes.
Aug
6
comment Why do interfaces require methods over members?
Members was meant to refer to "member fields" as opposed to "member functions" which I refer to simply as methods. I'm not sure from which language (if any) I picked up this convention. So given what I'd written, I see your answer, but I guess a comment under my question to clarify would have been more constructive.
Aug
6
revised Why do interfaces require methods over members?
added 6 characters in body
Aug
6
revised Why do interfaces require methods over members?
added 14 characters in body
Aug
6
comment Why do interfaces require methods over members?
OK to use the proper Java terminology, yes, "member fields". Thanks for pointing that out.
Aug
6
comment Why do interfaces require methods over members?
What does that prove? Does that one example prove you will never need simple/direct access to members? No. The point is, it is silly to have wrap members in getters / setters as part of the interface, if the language itself could deal with that automatically.
Aug
6
revised Why do interfaces require methods over members?
deleted 309 characters in body
Aug
6
revised Why do interfaces require methods over members?
Large expansion of the question to clarify that I mean "in a theoretical language"
Aug
6
comment Why do interfaces require methods over members?
OK -- wait a minute. After further thought, please see my edit to the question.
Aug
6
revised Why do interfaces require methods over members?
Large expansion of the question to clarify that I mean "in a theoretical language"