E4X: Not as awful as I thought

Tony Garnock-Jones wrote “Long, long ago, I complained about various warts and infelicities in E4X, the ECMAScript extensions for generating and pattern-matching XML documents. It turns out that two of my complaints were not well-founded: sequence-splicing is supported, and programmatic construction of tags is possible. Firstly (and I’m amazed I didn’t realise this at the time, as I…”

.NET is an endless supply of fascinating puzzles

Tony Garnock-Jones wrote “In C, size_t is unsigned. In Java, there are no unsigned fixed-width pseudointegral types, so it can perhaps be forgiven for having an array’s length field be signed. In .NET, however, which has unsigned ints, an array’s length field is also signed. What could it possibly mean to have a length less than zero?”

Closing over context still not easy in mainstream languages, Film at 11

Tony Garnock-Jones wrote “I find it fascinating that after so many decades of support for closures, we’re still stuck in a C-style mentality of passing function-pointers that take an explicit context argument rather than a proper closure object. Witness the design of .NET’s Type.FindInterfaces method: public virtual Type[] FindInterfaces (TypeFilter filter, Object filterCriteria); The TypeFilter argument is a…”

No CV?

Sophie Clare wrote “Although we’ve been very pleased to welcome Felix and Simon in the last few months, and we’re very happy about the return of Sam Jones, we’re still on the lookout for fresh blood. We really haven’t had much luck with recruiting strangers recently. Simon and Felix both came to us via personal introductions. We’ve been…”

Why does everything on the web require registration?

Michael Bridgen wrote “Some sites or services, quite reasonably, need to know who I am (and that I really am that person, to some acceptable level of verifiability). It’s usually because they hold data on my behalf, and neither me nor they want anyone else getting at that data. But why does InfoQ require me to register to…”

E4X and the DOM

Tom Berger wrote “Reading through tonyg’s recent post I came across something i haven’t yet seen in use – inline XML within Javascript code. E4X, it seems, has landed. It is now available by default in Firefox and Rhino – other implementation will surely follow. E4X, shorthand for ECMAScript for XML is a nice language extension to Javascript…”

Subclassing in JavaScript, part 1

Paul Crowley wrote “What's the right way to create a subclass in JavaScript? Wrong question, say the JavaScript advocates. JavaScript isn't one of those fuddy-duddy old class-based languages. It's something much more exciting: a prototype-based language! So remember, when you work with JavaScript, remember never to refer to "classes", because JavaScript doesn't have them, and it only shows you're stuck in the old way of thinking. I'm sure that these sentiments have done enormous harm to the reputations of real prototype-based languages, so let me banish it right here. JavaScript is not a prototype based language; it most closely resembles a class-based language, but all its mechanisms for doing the work of a class-based language are horribly broken, which is why its advocates try to pretend it's something else.”

E4X: I want my S-expressions back

Tony Garnock-Jones wrote “E4X is a new ECMA standard (ECMA-357) specifying an extension to ECMAScript for streamlining work with XML documents. It adds objects representing XML to ECMAScript, and extends the syntax to allow literal XML fragments to appear in code. It also supports a very XPath-like notation for use in extracting data from XML objects. So far,…”

Date and Time libraries in various languages

Tony Garnock-Jones wrote “Can a correct, or even sensible Date, Time and Calendar library be designed, for any programming language at all, ever, by anybody, genius, time expert, or not? Certainly [old link: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html ] Java’s Date API isn’t very inspiring, but some systems do manage to do better: here’s a quick survey of the state of Date/Time/Calendar…”

Windows Update broke my Thunderbird, Picasa, NikonScan and EpsonScan

francis wrote “For about a week, I thought my EpsonScan driver was broken: whenever I selected a folder to dump my batch scans, it would just hang there on the “Browse for Folder” dialog box. Then I noticed the same problem in NikonScan…, Picasa… and Thunderbird. Suspicious, huh? I rummaged around and noticed that Windows Update had…”

Best. Language comparison. Evar.

Tony Garnock-Jones wrote “Someone has finally figured out [old link: http://www.iolanguage.com/about/simplicity/] the ultimate metric for language complexity. Legions of ivory-tower academics can now retire. It’s a solved problem. Who knew it would turn out to be that easy? I guess people have just been overlooking the obvious for years!”

Thunderbird’s Ridiculous Menu Structure

Tony Garnock-Jones wrote “It so happened that, having just installed the beta of Thunderbird 1.5, one of the first things I wanted to do was compose an email. Early on in the message, I typed the word “summarise”. This spelling is correct in UK English, but clearly is not in US English, as the check-spelling-as-you-type indicator flashed up.…”