The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Sunday, November 05, 2017

My stance of tail call optimizations has changed over time

In writing the previous entry, I came across a post I made ten years ago about tail call optmization where I stated that I disliked it. But that was then, this is now, and now, I like tail call optimizations.

At the time I wrote that, I only thought tail call optimzations applied to a certain class of recursive functions, but no, it can be done in non-recursive functions as well. There may be limitations in when it can be done, but it's applicable to more than just recursive functions.

It's just a shame that such things are taught poorly and with bad examples (if at all—the term “tail call optimization” never came up in college). Of course, it would help if the language used for teaching supported the concepts as well (when I was in college, it was FORTRAN-77, Pascal and C—I'm not sure if FORTRAN-77 even supports recursion; Pascal was a pedagogical language designed by a computer scientist well known for being critical of the computer industry; and C was just a step above assembly language). Even some population langauges used for teaching today (cough—Python—cough) don't support tail call optimization because it's confusing or something.

Sheesh.

Obligatory Picture

[Here I am, enjoying my vacaton in a rain forest.]

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: http://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

http://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2017 by Sean Conner. All Rights Reserved.