3 ms·
Clearly the dev responsible for the input made a mistake, but why does it extrapolate into that javascript hatred? Like, before javascript is was impossible to
by gloosx 3y ago
Clearly the dev responsible for the input made a mistake, but why does it extrapolate into that javascript hatred? Like, before javascript is was impossible to make a mistake? The whole web was a perfect place without an issue?
- ninkendo 3y agoBefore JavaScript it was impossible to make this mistake, yes. The web was originally envisioned such that the hypertext described the form elements and the browser was responsible for the UI behavior. JavaScript brought the idea of a Turing complete language you can use to completely define the behavior of your UI, and with that it brought the possibility of an infinite number of mistakes that devs can make. JavaScript violates the rule of least power in this regard: https://en.m.wikipedia.org/wiki/Rule_of_least_power https://en.m.wikipedia.org/wiki/Rule_of_least_power
- gloosx 3y ago> Before JavaScript it was impossible to make this mistake Before JavaScript it was impossible to even implement such functionality on the client side... There was no "number" input before HTML5 spec which came out in 2008, and was adopting for 6 years before finally becoming a recommendation in 2014. You had to let user put any text in the input and do the validation on the backend, which had the same Turing complete language running letting you make any mistakes you want. Rule of least power is just a design principle, and it could not hold as an axiom of good design for the web, because when the least power becomes not enough power, it takes years for the adoption of new powers needed – that's why JavaScript exists in the first place.