News for hackers. Stuff that matters.
Re:Kay on the Meaning of "Object-Oriented Programming" by bitwize on Tuesday June 07, 2011 @12:22PM (#2629740)
It means when you have a name for something, the association between the name and the thing should be done as late as possible. In the case of a method call, the method to be invoked for a given message name should take place at the time of the call.

I've a lot of respect for Dr. Kay, but history has shown him to be wrong on this point: strong static typing and binding things as early as possible is how robust systems are built and how errors are minimized.

However I won't doubt that the Smalltalk approach is probably right for its original intended purpose (exploratory or didactic programming).

Re:Kay on the Meaning of "Object-Oriented Programming" by swannodette on Tuesday June 07, 2011 @12:39PM (#2629835)
> strong static typing and binding things as early as possible is how robust systems are built and how errors are minimized.

Huh? What about Erlang?

Re:Kay on the Meaning of "Object-Oriented Programming" by prodigal_erik on Tuesday June 07, 2011 @12:51PM (#2629886)
Erlang is very good at making systems that can sort of muddle along and keep running despite containing serious mistakes, but it's almost no help with preventing or fixing them. Every static type (even inferred) does the work of a number of unit tests, though of course not all.
Re:Kay on the Meaning of "Object-Oriented Programming" by swannodette on Tuesday June 07, 2011 @01:35PM (#2630077)
I suppose you've never head of Dialyzer which gives much better coverage than most static type systems.
Re:Kay on the Meaning of "Object-Oriented Programming" by prodigal_erik on Tuesday June 07, 2011 @02:08PM (#2630232)
No I had not. If Erlang now has working type checking, that's a huge advance. But I have to wonder why the Wikipedia page still claims Erlang is dynamically typed and doesn't mention this, and the getting-started guide barely names Dialyzer and doesn't demonstrate it at all (instead it's somewhere in the middle of the FAQ). How much consensus is there that it's ready for prime time?
Re:Kay on the Meaning of "Object-Oriented Programming" by chc on Tuesday June 07, 2011 @04:01PM (#2630625)
The fact that you can analyze the types doesn't necessarily change the fact that the language is dynamically typed (accepting that the terms are kind of wavy to begin with, and I've heard people mistakenly apply the D-word to very strongly statically typed languages with type inference).
Re:Kay on the Meaning of "Object-Oriented Programming" by silentbicycle on Tuesday June 07, 2011 @04:09PM (#2630653)
It's still dynamically typed. The dialyzer ("discrepancy analyzer") can detect many kinds of type errors statically by doing dataflow analysis over the possible types yielded by successful execution, but it's an external tool. Like lint, not part of the core language.

For a good overview, check "Gradual Typing of Erlang Programs: A Wrangler Experience " (http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160....) and/or "Practical type inference based on success typings" (http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.62....).

Re:Kay on the Meaning of "Object-Oriented Programming" by lmkg on Tuesday June 07, 2011 @12:41PM (#2629847)
> I've a lot of respect for Dr. Kay, but history has shown him to be wrong on this point: strong static typing and binding things as early as possible is how robust systems are built and how errors are minimized.

Could you expand on this? I don't see how late binding is incompatible with the robustness that static typing provides. In a traditional (C/++/#/Java) OOP setting, virtual methods and dynamic method dispatch allow for late-binding of method names to behavior based on run-time type specializations, but you still have the static compile-time guarantee that a method with the appropriate name and type signature will exist. This seems to me like it has the same robustness as an early-bound model, bounded only by the sophistication of the type system. Do you consider it qualitatively less late-bound than the message-passing paradigm, or am I missing something?