Live data from Hacker News

Elements of Programming (2019)

elementsofprogramming.com

1–10 of 13 posts

Re: Elements of Programming (2019)

#5
This is a great book.

This wasn't mentioned in the past thread. Alex presents his ideas in my forms. This one happens to be the most terse and mathematical. That can be good, but I think "From Mathematics to Generic Programming" is much more generally approachable.

One practical skill that's shown well in this book is writing functions that solve the easiest or special cases, and then layering those into general functions which ensure the preconditions for applying one of those special cases are met. It makes very readable code, and anytime a user of the code knows they have a special case, they can assert it and use the special one for some performance advantages.

Re: Elements of Programming (2019)

#6

This is a great book. This wasn't mentioned in the past thread. Alex presents his ideas in my forms. This one happens to be the most terse and mathematical. That can be good, but I think "From Mathematics to Generic Programming" is much more generally approachable. One practical skill that's shown well in this book is writing functions that solve the easiest or special cases, and then layering those into general func…

Thank you for recommending "From Mathematics to Generic Programming"! I wasn’t aware of this book.

Re: Elements of Programming (2019)

#7

This is a great book. This wasn't mentioned in the past thread. Alex presents his ideas in my forms. This one happens to be the most terse and mathematical. That can be good, but I think "From Mathematics to Generic Programming" is much more generally approachable. One practical skill that's shown well in this book is writing functions that solve the easiest or special cases, and then layering those into general func…

I was a bit put off by the introductory chapter where he is using a lot of nonstandard terms such as "abstract species/genus" rather than the usual type theoretic treatment. However, take that as the remark of an ignoramus.

Re: Elements of Programming (2019)

#8
post #7

This is a great book. This wasn't mentioned in the past thread. Alex presents his ideas in my forms. This one happens to be the most terse and mathematical. That can be good, but I think "From Mathematics to Generic Programming" is much more generally approachable. One practical skill that's shown well in this book is writing functions that solve the easiest or special cases, and then layering those into general func…

I was a bit put off by the introductory chapter where he is using a lot of nonstandard terms such as "abstract species/genus" rather than the usual type theoretic treatment. However, take that as the remark of an ignoramus.

Can you say more about why that put you off?

There are many different backgrounds from which to explore these topics, and type theory is just one way. Also the introduction isn't really trying to formalize computation itself, but give mathematical tools for talking about algorithms.

The abstract species/genus is probably inspired more by Aristotle than CS topics.

Re: Elements of Programming (2019)

#10
post #4

This book proved that C++ code can be elegant and beautiful.

It's probably best to understand it the other way around: Alex had been designing generic programming libraries in assembly, and tried to move to Ada — but was stymied. Simplifying into a just-so story: he approached Bjarne about adding a set of features to C++ to allow Alex to directly express generic programming in C++. That's what led to templates, etc.
Post reply on HN