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
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!
Thanks for back porting, I’ve learned a lot about problem solving and getting to root business case that’s driving the problem from reading your articles and answers over the years.
Thanks! That’s a nice thing to say. Much appreciated.
As a hobbyist and long-time lurker on your blog, thank you for all the posts you’ve made over the years. I learn something new and valuable every time I read one of your posts here, or one of your answers on SO. Reading through your old posts brings back memories of the first time I read them, and I also appreciate your modern commentary on them. If you ever wanted to switch careers, you would make an excellent teacher.
I hope you continue to share your knowledge and keep up your good work.
Thanks for the kind words; I appreciate it!