Helltime for June 1
Announcer: Now for quick hits and commentary on software development topics from around the web, the EIP web-ring brings you the stigmatized spawn of a refactory, MoffDub, and Helltime!
- Jack Cough nails it when he explains how to teach programming to kids. Describing programs as machines is a great way to explain to the layperson a basic way of decomposing the problem into interacting parts. This is the way I started thinking when I was a young crumb-cruncher with a Visual C++ 6.0 compiler in hand.
I can easily see this example extended to begin teaching OO concepts. Each piece of data coming out of the machine would have its own machine “attachment”…and I guess in this way, it is a short leap to making the point that closures and objects are equivalent.
- Gilad Bracha over at Room 101 rakes Java over the coals for not being a pure OO language like Smalltalk. He cites type hiding as a big reason why this is Java’s “original sin” and I couldn’t agree more.
And then there’s auto-boxing. I have to turn on syntax highlighting in Eclipse and have auto-boxed expressions in bold red so I can know they are potential throwers of null pointers. Gilad’s Int example is said to use auto-boxing, but is completely transparent to the programmer. What was left to be said in the comments is that instances of this new Int class would have to be non-nullable in some way: providing the ability to declare classes are non-null, treating null as an object, and so on.
Gilad states in a comment that you might want to declare types as (Equipment | Null) equipToStore; (Equipment or Null). I’ve got to say, I don’t get what this buys you. I still can’t call a method on this variable specific to Equipment.
- Conal Elliott hilariously writes how C is a purely-functional language. Definitely worth the read. When you come back here, remember that, just like in Smalltalk everything, and I mean everything, is an object, a functional language is a language where everything, and I mean everything, is a function. That’s right: Smalltalk is the the lambda calculus of OO.
|Announcer: You’re reading the EIP web-ring.|