Monday, July 24, 2006

If you're hoping for a long, thorough essay covering all sorts of inadequacy and annoyances of Javascript, you're out of luck. I just have one thing to whine about today: lack of interpolation.

I do a lot of stringish stuff in Javascript. Loads. Just recently I was editing this argument: sp + ',' + mp + ',' + dp + ',' + type + ' ' + x + ',' + y + ' (' + done + '/' + total + ')'

That's ugly. Even more than it's ugly, it's a major pain to type out. $sp, $mp, $dp, $type $x $y ($done/$total) is slightly annoying, but almost incomparably better.

sprintf could help, but is still majorly annoying. I want interpolation.

(The biggest Javascript annoyance is, of course, incompatibility, especially when combined with IE's inability to give useful error messages.)

No comments: