Go to content Go to navigation Go to search

Programming Language Philosophy · Dec 14, 08:31 PM by David Mercer

For the past 20 years I have had a pretty fierce tension inside me between the ‘theoretical purity’ and ‘getting things done regardless of what it takes’ schools of thought in programming and computer science (other subdivisions are possible, but this axis is what concerns us here! :-)

I seem to have evolved in my personal practice into having not just one preferred programming language at any given time, but two. Set the wayback machine for 1984, when I got the first computer of my OWN. I only got it after 2 years of working as a paper boy every morning and saving some every month. Until then I only had programming time when at school, and the late bus left at 4pm-ish.(Bleg: someone who went to the first 3 years that Computech was in existence in Fresno, CA, please refresh my memory!)

I had the teletype (Diablo Hitype II element! Letter quality! 12 cps!) and a 300 bps acoustic coupler for at least a year before my first machine, which in a certain sense was no hardship as my teletype couldn’t keep up with that modem! But I didn’t get a remote timesharing account with any compilers on it until age 16 when I discovered unix and the pubnet, it was all BBSes until then, but I digress! We’re talking about the philosophy of programming languages here, not OSes or networks!

I started with what they had at school: Applesoft BASIC on Apple ][e computers (personally written by Bill Gates!). Soon I learned of Integer BASIC, the older, original Apple ][ interpreter that Woz had written originally, which was still in there is you knew how to launch it. If you wanted to do any serious graphics or games, you had three choices: use Integer BASIC and Woz’s routines that only worked in it, call the vector graphics routines from Applesoft BASIC (woz I think wrote those too, help my memory, folks!), or use assembly language/machine code.

If you knew what you were doing it was possible to mix all three. I was probably the member of our clique who did that the most….any of the KARDS have recollections, email me! I found that to be less painful than living in 6502 assembler all the time, myself.

Once I had my own PC (MS-DOS 1.1! 128k RAM! 2 360K 5 1/4! 3.36 MHz! Ubber geeks name that box in the comments!) I started with musLISP, a re-licensed product that MS used to round out their product line and sold for a quarter of the price ($200 vs. $800) due to the missing, excellent, and huge SoftWarehouse documentation that came with their full release. They knew that serious professional developers would need to buy their $800 manual after Bill got them in the door anyway.

That or do as I did and suffer through learning a dynamically scoped 2-lisp with close to no docs or books. The previous two years of heavy multilanguage programming that came after I learned 6502 assembler (that’s also where you would do your glue code between two other languages that didn’t know about each other) and endless reading of BYTE, other mags and piles and piles of books from the library had led to me believe that lisp was the only truly appropriate vehicle for the problems I was interested in.

MS-muLISP was a very, very painful environment. You needed to load at least one of the emulation environments to get anything done At All! Maclisp, zetalisp, and at least one more variant were there, in incomplete, undocumented form. Aside from their lisp source.

I had no idea in the Hell which was better for what, so I had to Use The Source, Luke. This was the first program I paid any Real Money for, and while it itself was a binary, all of the language emulation extensions, editor, debugger, and libraries were in source form. Kinda like how most of emacs (modern ones!) is in elisp, and only the core is pre-compiled. Of course a runtime or source redistribution license was very expensive, whether you got it from Bill or SoftWareHouse.

But you could read the source, which I did. SoftWareHouse was mostly interested in lisp as the implementation language for their computer algebra system, and their domain specific language for it, muSIMP, was built on top of muLISP. MS wanted the programmer market in the US, and they wanted it as a check box feature on their product list. The only clear or enlightening part of the documentation was the original half page definition of lisp (lists, cons, lamba, eval and apply) from the Lisp 1.5 manual and it’s half page or so intro from the same document, that they’d gotten permission to throw in there. That page in the binder was my guide, my koan, my demon and my savior for quite a while in high school.

My other passion at the time was FORTH. It shares many of the same benefits of lisp, believe it or not, but runs with them in the opposite direction, going to an even lower level into the machine rather than starting symbolically as lisp does, before you build up your own domain specific language out of it. It has meta compilation and everything!

The development pattern I fell into for quite some time and was most productive with was as follows. If I could completely solve a problem and express it in elegent code in lisp, yay! all was good and as it should be in the world. I would usually prototype in the maclisp emulation mode, as it was the most featurful of those provided (selected zetalisp modules loaded! :-)

If a problem just took too much cpu time or memory from recursion, I would get it working on the base inductive cases, and then translate to FORTH. I had already previously written my own graphics (320×200 4-bit greenscale!) and trig routines (no 8087!) in assembler, and could link them from muLISP or a variety of FORTHs, but I still often had to port from lisp to FORTH to run anything other than simple inputs or cases. I had long relegated C to the bookshelf where my manuals collected dust, as being too unsafe and cryptic, and if you want that much pain, why not use assembler?

HAH, talking about out of the mouths of babes! C IS portable assembler! No one told me for years, after I got on the net in 1987 sometime :-) That’s why to this day I have written hardly any C code from whole cloth, but I have edited, built, ported, tweaked, hacked and compiled endless reams of it over the years.

FORTH was my strictly typed language of choice, maclisp was my dynamically typed language of choice, and x86 was my assembler.

Lately Haskell has been my strictly typed language of choice (ah, total purity!!! I became a convert last month :-), javascript has been my dynamically typed language of choice, and apparently both java and C are my assemblers!

I think that any programmer who wants to master their art should always have at least one language in each category of the three that they are fluent in for their chosen platform. All three paradigms are at times required to most efficiently solve a problem, singly or in combination.

-David Mercer
Tucson, AZ

  1. I found floating point decimal in microsoft in 1984 a program written by me in 1971.I did nothing with it. sorry about leaving a comment when you were introducing yourself. My first love was asembly language. Yet I didn’t touch a computer from 1971 to 1984. A VIC.


    elwinrandall    Nov 30, 05:06 AM    #

commenting closed for this article

The Devil's Own Disclaimer: what that fine print means The Devil's Own Disclaimer Deconstructed