The platform is just another library

I’ve been listening to Jake and Paul‘s new HTTP203 audio podcast 1 and in the middle of it, a weird thing happened. They were talking about moment.js, an excellent date parsing and formatting library for JS, and pointed out Intl, “the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting”. And that seems great. But there was a sort of air, an idea, that I picked up from them when listening with which I disagreed. Specifically, they seemed pretty keen on Intl because it’s part of the platform, rather than being a library. Now, I might be making this up, and they may be horrified that I misunderstood them, in which case I apologise. I may be accusing them of this unfairly because they work on a specific browser and therefore I see them as liking the platform more than they maybe should. But here’s the thing.

The platform is just another library.

That something’s available “in the platform”, for me, when developing, is no major benefit. I pretty much prefer “use this one library, which works everywhere”, to “use this platform API, which works some places, and polyfill it for other places”. I admit that I rather expect that the library I choose will itself use the underlying platform API if it’s available, and I prefer in general to use libraries which polyfill platform APIs rather than provide their own distinct APIs, but that something is available “in the platform” is no major benefit in my eyes. Sure, there are performance benefits to having the browser do it, and greater performance benefits in not having to load a library to do it (and I am by preference a Vanilla JS coder) but in practice there are hardly any APIs that I’m learning about now which are actually available wherever I want them. “It works everywhere except on iPhones” is about the same as “it doesn’t work anywhere”. “It works in Chrome and others will catch up soon” is about the same as “it doesn’t work anywhere”. “It works everywhere except Internet Explorer” is… well, I’m impure and horrid, so sometimes I just give in and say “fine, no IE support” and feel guilty about it, but basically it feels about the same as “it doesn’t work anywhere”. Now, obviously browsers need to build this stuff so that it’s everywhere, and some browser has to be first. But the idea that “this is available in a library, and that’s not great” but “this is available in the platform and is therefore better”… doesn’t actually seem to play out as better for me.

Maybe I’m alone in this. Maybe I’m completely mischaracterising Jake and Paul and if so, sorry chaps, don’t burn my house down.

  1. not the same as the videos! Loads more hot Paul and Jake action! nice one, chaps!

More in the discussion (powered by webmentions)

  • Stuart Langridge responded at twitter.com @aerotwist @jaffathecake more detail on how the platform is just another library: kryogenix.org/days/2015/09/2… -- if I'm being unfair, sorry!
  • ♥♥ Lilian s2 ♥♥ responded at twitter.com The platform is just another library dlvr.it/CDrjLZ
  • Andrew B. Collier responded at twitter.com Stuart Langridge: The platform is just anotherlibrary kryogenix.org/days/2015/09/2… #ubuntu #linux
  • Mark Boas responded at likes this. (twitter.com)
  • Ross Bruniges responded at likes this. (twitter.com)
  • Birmingham.IO responded at twitter.com Stuart Langridge: The platform is just another library by @sil buff.ly/1QXWLCv #PlanetBirmingham
  • Paul Lewis responded at twitter.com @sil @jaffathecake LET’S NOT GET INTO THIS AGAIN, STUART...
  • Stuart Langridge responded at twitter.com @aerotwist @jaffathecake I suspect I may have explained it badly :-)
  • Paul Lewis responded at twitter.com @sil @jaffathecake No I think it was us who did, really. Your post was great, I was just taken aback that there was intelligent discourse.
  • Stuart Langridge responded at twitter.com @aerotwist @jaffathecake why, thank you, sir :)
  • Paul Lewis responded at twitter.com @sil @jaffathecake OT: why is it we don’t run into each other at conferences? Am I attending the wrong ones, or are you?
  • Stuart Langridge responded at twitter.com @aerotwist @jaffathecake I haven't been to many recently -- too busy. I'd like to fix that; might submit some talks
  • BrendanEich responded at likes this. (twitter.com)
  • David Brooks responded at twitter.com @sil I’m broadly with you.
  • !FALSE responded at likes this. (twitter.com)