Live data from Hacker News

A talk with Walter Bright about Empire

madned.substack.com

101–102 of 102 posts

Re: A talk with Walter Bright about Empire

#101
post #86
post #84

Earlier quoted context omitted.

>The distinguishing feature of Contract Programming is how it handles inheritance. How does it handle it?

It applies the Liskov substitution principle to it. So preconditions can only be widened in subclasses, and postconditions can only be narrowed. In simple terms, it means that when you override a method, the override's precondition is automatically OR'ed with that of the superclass, and your postcondition is AND'ed. And ditto for interface inheritance.

Thanks, that makes sense. IIRC, I read about this either in Bertrand Meyer's book Object-oriented Software Contruction, or in the Eiffel language's docs, some years back, though I may not have known about it as an application of the Liskov substitution principle at the time, or even later, although I did read about the Liskov principle later :)

And I may not have grokked the Liskov principle when I read it, either, but thanks to your reply, I now have a glimmering of what it means, and will look it up again :)

Re: A talk with Walter Bright about Empire

#102

Earlier quoted context omitted.

Hello Walter! I'm interested in programming languages and the design of compilers. I'm relatively novice to programming, but languages have long captured my imagination. Three questions for you: Do you have a blog where I can read about your compiler escapades? have you any advice for the aspiring novice? which is your favorite language, and why?

cybernautique, we can't contact you on your email listed on your profile {username} (at) bitsoflore (dot) net Please contact us on morphle (at) ziggo (dot) nl

I've replied from a different email address. Please check your spam/junk folder!
Post reply on HN