Hacker News new | ask | show | jobs
by tomelders 3771 days ago
It's one of those instances where developers went looking for a word that perfectly articulates what it's doing, but is so esoteric as to be useless.

> being of identical or similar form, shape, or structure

I call it fronty-backy-samey-samey and everyone knows what I'm talking about.

2 comments

It's not really esoteric... it just kind of has the wrong connotations, because it's used rigorously in mathematics, and here it just means "portable between different JavaScript runtimes," pretty much.

To me the word makes me imagine a web application that can parse its own rendered HTML and get back the application state. Which sounds kind of interesting...

It's not about runtimes. It's about environments. The difference between Node and Chrome isn't so much the runtime as that one is on the server (with arbitrary network and file I/O) and the other is a browser (with a DOM and Web APIs).

Isomorphic means that the same code can be used to "pre-render" an app on the server and to interactively run the app on the client, preferably without losing input state if the client-side execution is delayed (i.e. not throwing away the rendered content but attaching to it).

More generally it means that the code wraps any underlying APIs to make it behave similarly (but not necessarily identically) in node and the browser. Like isomorphic-fetch, which uses a polyfill (i.e. a fallback implementation in the absence of a native API) for the Fetch API in the browser or a node-based implementation in node.

The reason some people prefer the term isomorphic over universal is that isomorphic has no conflicting definition in the context of web apps. Universal on the other hand is extremely vague and ambiguous (ranging from "takes accessibility into account" to "works with different third party APIs" to "language independent").

The reason some people prefer the term universal over isomorphic is that isomorphic as a scientific term has unrelated meanings in mathematics, chemistry and other fields which can be domains for web apps.

Of course the real joke is that the definition is only about node and browsers, making no claim whatsoever about "all JS environments" or even "most". This is one of the reasons I personally don't like the term "universal": it implies a scope that simply isn't intended by most projects the term would be applied to. Something that only works in Edge and Node 5 might be "universal" but it isn't universal at all.

it just kind of has the wrong connotations, because it's used rigorously in mathematics

And the original use was in Philology[0]. Just because a word has two different meanings in two different contexts doesn't means it's wrong. I'm certainly glad the linguists didn't get up in arms when the mathematicians gave the 'wrong connotation' to isomorphism.

[0] - https://books.google.com/books?id=hZpeAAAAcAAJ&pg=PA711&lpg=...

Well, I didn't mean to claim it's prescriptively wrong, just that to my mind, maybe because I've been around a lot of mathematicians and coded a lot of Haskell, the usage jumps out as kind of weird... and anecdotally, I've mostly heard "isomorphic JavaScript" used kind of ironically, with a wink bordering on a cringe.

By the way, for the broader point about language mutation, and prescriptivism vs descriptivism, I think there's a common stance against prescriptivism that also seems to rule out any negative opinion about language change—to which I say, hey, negative opinions are part of the whole mess too, even from a descriptivist standpoint. But this is a derail already; sorry.

Consider "fronty-backy-samey-samey" stolen