Events & News
Colloquium
Category | Lecture |
Date | Thursday, April 25, 2013 |
Time | 11:00 am |
Concludes | 12:15 pm |
Location | Gould-Simpson 906 |
Speaker | Richard T. Saunders |
Title | Lecturer |
Affiliation | University of Arizona, Computer Science |
Recursive, Dynamic, Heterogeneous Types in Statically Typed Languages
Today’s modern software projects are written in many different languages:
Python, C++, Perl, Java, Javascript, Lua, Unicon, C, all co-exist within a
complex environment implementing different components of a system. This
proliferation of languages causes dynamically-typed language concepts to
infiltrate statically-typed languages.
One important idea that seems ubiquitous across dynamic languages is the
dynamic, recursive, heterogeneous dictionary: the Python dict, Perl hash,
Javascript object, Lua table, and Icon/Unicon table are all realizations of
this abstraction—JSON and, to a lesser extent, XML are language-agnostic
versions of the dynamic dictionary. Statically typed languages (like C++ and
Java) historically have trouble expressing and dealing with dynamic
dictionaries without clumsy libraries. This session explores how to represent
dictionaries in C++ by introducing a simple, novel solution for dealing with
dynamic constructs by *embracing* unique static-typing features of the C++
language: type-inference, user-defined conversions, type selection, and
overloading.
Taken all together, these static features paradoxically make dynamic
dictionaries much easier to manipulate from C++, approaching the ease of
dynamic dictionary manipulation in dynamic languages.
Note that these techniques do not require special reflection
facilities/libraries.
Biography
Richard T. Saunders has worked with C++ for about 18 years at Rincon Research Corporation doing soft real-time Digital Signal Processing. He has helped build and field many real systems using both C++ and Python. An interest in Programming Languages and Parallelism has led to multiple presentations at PyCon, C++ Now! and IPDPS. He also occasionally teaches Computer Organization, Software Engineering, Python and C at the University of Arizona in Tucson for the Computer Science and SISTA departments.