3 ms·
The problem arises when you as developer rely on this thing that Google invented but suddenly got bored of and shut down or changed a lot so your implementation
by Moru 7y ago
The problem arises when you as developer rely on this thing that Google invented but suddenly got bored of and shut down or changed a lot so your implementation has to be rewritten. Many have been hit by this over the years so are reluctant to try again.
- WanderPanda 7y agoThere are counterexamples, though: https://news.ycombinator.com/item?id=16347083 https://news.ycombinator.com/item?id=16347083
- scarface74 7y agoAs of last year, the last time I tried, the Google backed maps app still works on my first gen iPod Touch - last updated in 2009 and the first gen iPad.
- jkoudys 7y agoI've been hit by this at least a half dozen times over my career. Apps scripts are probably the latest one causing me pain. I love being able to integrate with docs & sheets, but man if that ecma version isn't ancient af.
- deathanatos 7y ago> man if that ecma version isn't ancient af. It is incredibly ancient. It's possible to use Babel w/ it though, and write reasonably modern JS. There's a CLI tool out there to upload something into an Apps Script … app? too; at one point, I had a project w/ a Makefile that would run the project through Babel and then upload it to Google. I didn't try all the features (and I didn't have any npm/package management), but things like format strings, for(… of …) loops, let/const, new Map() all worked. Babel is a wonderful, wonderful thing.
- jkoudys 7y agoIf it were simply ancient, that'd be one thing, but it's a weird hybrid of es3 with _some_ es5 features, and some es6 ones that often don't work the same. e.g. it has `const`, but no `let`, and it's not even block scoped so it's not that useful. Destructuring is there, but for arrays only and not object properties. I built my babel config to balance clean, new syntax with the least intrusive transforms possible. e.g. I have loose template literals on, since `\`hello ${world}!\`` is an easy transform (and still readable in the final source) as `'hello ' + world + '!'`. Generators, for .. of, and object rest/spread, are okay, but babel puts a ridiculous amount of helper functions at the top to support this. I suppose I could always configure each project with a shim file, but that's extra overhead I really could do without. block-scoping, arrow-functions, function-name, shorthand-properties, spread (for arrays and arguments), template-literals (loose, so `+` not `String#concat`), and exponentiation-operator I found give the most bang for your buck. `for .. of` is nice but if I can pass arrow functions into my `forEach` callbacks that's pretty clean too. Pretty great being able to say ``` rows.forEach(row => { const payload = row.map(([name, rank, serialNo]) => ({ name, rank, serialNo })); SomeApi.doThing({ onComplete() { foo(); }, payload, }); }); ``` in gapps. That said, it took a while to even figure out how much was possible, but yeah it's a big step up.