CppCon 2016: Robert Ramey “C++, Abstract Algebra and Practical Applications'

preview_player
Показать описание


Modern C++ includes ample facilities for manipulating types a compile time. These facilities have evolved from a small bag of miscellaneous tricks to an large bag of miscellaneous tricks. It turns out we can select a subset of these tricks to build a representation of abstract algebra within the C++ type system. This methodology will help programmers select and exploit the C++ type manipulation facilities to create more transparently correct, efficient and maintainable programs.

This session does not presuppose and particular mathematical background. It depends upon only the most basic and key ideas of abstract algebra which will be explained as part of the presentation.

This work was initially inspired by work by Barton and Nackman as well as some ideas from Denotational Semantics.

Robert Ramey
Robert Ramey Software Development
Proprietor
Santa Barbara, CA


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

Very astute of you to join this out. I can't sneak anything past you guys.

Actually, it turns out that I didn't treat floating point non numeric results carefully enough and assumed too much. A couple of people pointed out to me that floating point arithmetic is NOT associative - which was one big surprise to me!

Thinking about this, it's too bad we couldn't spend a little more time on this. This goes to the reconciliation between our logical model - layer 1 in my hierarchy and the computer approximation to that model - layer 2 in my hierarchy. Using the techniques described here, code addressing these issues would be found in one place (or one place for each type) rather than being sprinkled throughout the program in an ad hoc manner. And that bit of code would be orthogonal to the application coding itself. This would further the cause of program correctness.

robertramey
Автор

Thanks for watching this video - any comments you want to make are welcome. If you want download the slides (with audio) You can Google "Robert Ramey software" to find my website. (you tube won't let me put a url here). And any kind of feed back - comments, thumbs up/down is helpful to me and I appreciate it.

robertramey
Автор

Possible slide errors:
21:10 isnan(area) might be perimeter
27:23 isnan(t) t is not defined

carstenhansen