Live data from Hacker News

Celebrating Tony Hoare's mark on computer science

bertrandmeyer.com

21–30 of 39 posts

Re: Celebrating Tony Hoare's mark on computer science

#21

Meyer makes an important point that often gets lost: the null pointer predates Hoare. NIL existed in McCarthy's Lisp in 1959, six years before Hoare added null references to ALGOL W. The "mistake," if it was one, was already widespread. What made Hoare's 2009 confession so impactful wasn't that he was solely responsible — it's that he was the first person with that level of authority to publicly say "this was wrong."…

LISP was special because it had only 2 data types: atoms and lists.

Both lists and atoms could appear in any place in any function or special form.

NIL was a special atom, which was used to stand for an empty list. Because it could appear in any place in a LISP program, it could be used anywhere where one had to write that something does not exist.

In a programming language with a more complicated and also extensible system of data types the handling of "nothing" values must also be more complex.

Any optional type can be viewed as a variable-length array of its base type, whose maximum length is 1 and a null length indicates a non-existent value.

This is equivalent with the use of NIL in LISP.

However, it is better to consider optional types as a distinct method of deriving types from base types than arrays, structures or unions, because in most cases more efficient implementations are possible for optional types than implementing them as variable-length arrays that may have a null length or as tagged unions where one of the alternative types is the empty set (a.k.a. void).

Re: Celebrating Tony Hoare's mark on computer science

#23
post #6

In the early eighties, for example, he brought to Oxford the creators of two major formal specification languages: Cliff Jones with VDM, Jean-Raymond Abrial with Z. At Oxford, Z actually underwent a systematic rework, reminiscent of the Goethe quip reproduced above, with Frenchmen and mathematicians replaced by English mathematicians (or computer scientists). The new version enjoyed immense success in Britain, won a…

I can only imagine what it must've been like throughout the 90s and teens seeing people whack their heads against concurrency.

Re: Celebrating Tony Hoare's mark on computer science

#24
I mentioned this in the other thread on Tony Hoare;

Theories of Programming: The Life and Works of Tony Hoare published by ACM in 2021 - https://dl.acm.org/doi/book/10.1145/3477355

See the "preface" for details of the book - https://dl.acm.org/doi/10.1145/3477355.3477356

Review of the above book - https://www.researchgate.net/publication/365933441_Review_on...

PS: You can check with some lady named "Anna" on the interweb for book access :-)

Re: Celebrating Tony Hoare's mark on computer science

#26
post #6

In the early eighties, for example, he brought to Oxford the creators of two major formal specification languages: Cliff Jones with VDM, Jean-Raymond Abrial with Z. At Oxford, Z actually underwent a systematic rework, reminiscent of the Goethe quip reproduced above, with Frenchmen and mathematicians replaced by English mathematicians (or computer scientists). The new version enjoyed immense success in Britain, won a…

These are all great contributions, I even briefly used Occam/Transputer.

Most however will be most familiar with Quicksort[0] and NULL.

[0] https://en.wikipedia.org/wiki/Quicksort

Re: Celebrating Tony Hoare's mark on computer science

#27
post #6

In the early eighties, for example, he brought to Oxford the creators of two major formal specification languages: Cliff Jones with VDM, Jean-Raymond Abrial with Z. At Oxford, Z actually underwent a systematic rework, reminiscent of the Goethe quip reproduced above, with Frenchmen and mathematicians replaced by English mathematicians (or computer scientists). The new version enjoyed immense success in Britain, won a…

I can only imagine what it must've been like throughout the 90s and teens seeing people whack their heads against concurrency.

Well, of course, a lot had already been done by the time I got there. But what really struck me about CSP was how easy it was to reason about concurrent programs because synchronization and communication were the same thing. In my doctoral thesis I created a provably secure multi-user file systems which went from specification to CSP to occam.

Re: Celebrating Tony Hoare's mark on computer science

#28
post #7

> First, the null pointer is essentially inevitable if you want to model the world, which has references (things containing denotations of other things). I took major exception to this. The real world doesn't have non-things, and references do not demand to refer to non-things. If your domain does actually have the concept of null, just make a type for it. Then you won't accidentally use a 6 or a "foo" where a null w…

Tony Hoare himself said that it wasn't needed in the type system he'd created. He added it because it was so easy to do so and couldn't resist the temptation.

OTOH seeing undefined method 'blah' for nil:NilClass isn't really any better.

Post reply on HN