[Haskell-cafe] Object Oriented programming for Functional Programmers

MigMit miguelimo38 at yandex.ru
Wed Jan 2 10:48:07 CET 2013


On Jan 2, 2013, at 10:52 AM, Mike Meyer <mwm at mired.org> wrote:

> 
> 
> [Context destroyed by top posting.]
> MigMit <miguelimo38 at yandex.ru> wrote:
>> But really, "Design by Contract" — a theory? It certainly is a useful
>> approach, but it doesn't seem to be a theory, not until we can actually
>> prove something about it, and Eiffel doesn't seem to offer anything in
>> this direction.
> 
> You just stated (briefly, and not very rigorously) the theory: DbC is a useful approach to programing. Note that it's a theory about *programming*, not the resulting program.

Well, you can call that a theory, for sure. But I think it's usually called an "observation". I always thought the theory is something that allows us to develop some new knowledge. Just stating that "comfortable chairs make programmers more productive" doesn't constitute a theory.

> Type classes are the wrong feature to look at. Type signatures are closer to what DbC is. Are type signatures a hack to get around deficiencies in the type inferencing engine? After all, you can strip all of them away and have essentially the same program.

I've tried to clarify my position in my response to Bob Hutchison.


More information about the Haskell-Cafe mailing list