News for hackers. Stuff that matters.
Re:A day without JavaScript by sametmax on Wednesday June 07, 2017 @01:53PM (#14508433)
> it may be enough to extend the HTMLElement prototype a bit

You lost me here. Anybody extending standard objects cannot be taken seriously.

Re:A day without JavaScript by megous on Wednesday June 07, 2017 @02:41PM (#14508812)
Do you realize JavaScript is a prototype based programming language? It is a major and very useful feature of the language. There's no reason not to use it. There are some things to be careful about with interop if you need it, but that's it.
Re:A day without JavaScript by jamiepenney on Wednesday June 07, 2017 @05:27PM (#14510014)
We've already learned from our past mistakes changing the prototype of the standard library - the Ruby community learned the same thing with monkey patching their standard lib too. The maintenance overhead far outweighs any immediate benefits.
Re:A day without JavaScript by megous on Wednesday June 07, 2017 @05:46PM (#14510112)
What maintenance overhead? Current and future costs are reduced by making code simpler and cleaner in the first place by using prototypes efficiently.

Also, to be clear, I'm suggesting adding new methods to DOM object prototypes, not changing behavior of existing methods.

Re:A day without JavaScript by ehsanu1 on Wednesday June 07, 2017 @09:29PM (#14511213)
Applications may be able to do this in a controlled manner. Library authors never should.