Porting old posts, part 3
I'm continuing in my efforts to move and update all my old content from my MSDN blog to ericlippert.com. Today, posts from early October of 2003.
In, out, in-out, make up your mind already
The late-binding code designed for OLE Automation was pretty good, and quite novel for its time, but there were a few problems. The whole idea of late binding is that the caller does not have to know the details of the callee; the fact that the caller must know whether the calling convention is in-out vs out to avoid a memory leak is unfortunate.
A whole lot of nothing
A little more on nothing
What's the difference between an empty sack and not having a sack at all? Programming languages often conflate these concepts, but separating them, as VB did, is quite confusing also.
Eric's blog for January 279th, 2003
Once again we return to the many problems of software horology; this episode features commentary from Microsoft notable Raymond Chen, and Brendan Eich, the original designer of JavaScript and later CEO of Mozilla who stepped down after supporting anti-equality initiatives in California; he called the characterization of JavaScript as "scripting for Java objects" as a "scam", which I found astonishing at the time.
To clarify: I was fully aware for many years prior that JS was not originally designed to be "scripting for Java", and that the languages did not have much in common beyond superficial syntactic details; that was all well-understood by all participants in the design process. The part that I found astonishing was the characterization of it as scam; that is, a deliberate attempt to mislead developers for profit.
Now that I think about it, I still find it pretty astonishing.
I can't make my script do nothing
Spot the defect
Successfully pausing a program for some interval is surprisingly complicated, particularly in a world before asynchronous workflows were built into popular languages. Trying to spot defects in a poor implementation demonstrates the sorts of problems you can easily run into if you're not careful.
It also shows how strongly pausing a program must be tied in to the execution model of the host; this theme recurs in "Why can't I create the WScript object?"
These four posts seem unrelated but now that I look back, they have a common thread:
Though ostensibly about looping constructs, the takeaway here really should have been that common tasks which are tedious or error-prone for developers should be in the libraries or language.
Some languages are do-what-I-mean languages, and some are do-what-I-say languages. There are pros and cons of both. This has consequences for language design.
Why can't I create the WScript object?
WSC vs WSH
Even after working on or near scripting languages for, at this point, seven years, at this point I still did not understand just how deep the "do what I mean" ethos runs in developers who primarily write administration scripts.
Worse, I lacked both the "beginner mind" of people who are coming to a complex system for the first time, and an appreciation of how unnecessarily confusing the alphabet soup of scripting technologies was for beginners and experienced professionals alike. I learned a lot from these frustrated user comments.
Lots more to come!