Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Voxera115855y@vorticalbox not if you break literally millions of pages like banking and such.
And remember, you have to convince not only node.js but browsers to to get any traction.
Good luck getting MS, Apple and Google to break thing just to please us coders ;) -
@Lor-inc
This. I've been floating the idea for years as part of a bigger transparent capabilities feature. The big resistance to it comes from the browser implementors. They'd end up having to support different discrete selectable runtimes simultaneously in order for it to be meaningful, which means multiple incompatible versions of the engine running at the same time.
The Js ecosystem is kind of nightmarish when you peel back the veneer a little. -
@Lor-inc @SortOfTested no. What is <head>? the html tag? Wtf?
What we need are interpreter pragmas. A bit like "use strict";. So it can be used in Browsers and NodeJS. -
@nitwhiz
Less head, more runtine bootstrap configuration. I'm open to whatever impl makes sense. Browsers could expose a hook in head, node arg at init, etc etc. -
@SortOfTested That doesn't make sense imo. The code only works if the specified settings for the engine are set (like arrayBullshitForNoobs=true), so it makes no sense to set this thing as far from your code away as possible. As we have no compiler, it has to go into the file.
-
@nitwhiz
It could also go on the reference. It actually makes sense to create a configuration decouple for that based on targets. Then there's the regression story.
Either way, Osmani and the rest of the gang have already hard vetoed it, so it's a bit of a moot point. -
joas19425yIsn't the first argument of Function.prototype.call `this`? And the second argument is the first argument passed to the function.
Related Rants
hey node what type is this?
> typeof []
'object'
but then
> Object.defineProperties.call([])
Uncaught TypeError: Object.defineProperties called on non-object
so is [] an object or not?
devrant
js
nodejs
weird