Earlier quoted context omitted.
Theoretically, to what extend could the weird type conversions be prevented with the use of a strict linter? My intuition would be all, but I haven't thought much about it.
Once code reaches a certain complexity level (and mind you, the threshold is rather low), you'll need dynamic generation of code and data (or else, write 10x the amount of lines of code). For this to happen in a safe way, you really, really, do need the runtime to be strictly typed.
JavaScript is Eating the World
191–200 of 323 posts
Re: JavaScript is Eating the World
#192Re: JavaScript is Eating the World
#193ARG! The floating point handling in JS bites (bytes?) me almost daily. I code in JS every day but I hate this number "bug" the most. Having to frob back and forth with "int" to make it not totally broken. Am I the only one?
Re: JavaScript is Eating the World
#194Earlier quoted context omitted.
This sounds a lot like how it's possible to fit a square peg in a round hole if you have the right drills and grinders and so on.
That's exactly what it is. The fundamental issue is that the overwhelming majority of interactive websites today don't actually need to be interactive, and may even be better off as old-fashioned HTML pages served by the server. But people love over-complicating stuff, and when the end result is complex the toolchain has to be complex too, not just for one person but the whole team. Then you end up with developers wh…
Some of the incentives fueling this trend could be viewed as undesirable (e.g. monstrous ads on news sites as a desperate bid for profitability), but that doesn't negate the fact that the incentives exist, and aren't simply "people love over-complicating stuff".
Re: JavaScript is Eating the World
#195Earlier quoted context omitted.
> That's the point. There is no explanation, other than the same reason that bellbottoms are in again this year. Or out, I don't actually know. You mean you can't come up with one. Because for me, which followed the scene for 20+ years, there is a perfect explanation.
I have no horse in this race; Care to share the perfect explanation?
Re: JavaScript is Eating the World
#196The more time goes by the more I feel crazy for missing whatever would motivate people to use js for anything more than is strictly necessary. Single threaded server??? I mean come on man, I understand you don't need parallelism for a lot of use cases but even if that fits your situation why javascript? It can't be that hard using a different language. I refuse to believe that.
The language is non-blocking, so any asynchronous tasks (DB read/writes, disc I/O, cache, http, etc) will immediately jump to processing the next request the moment it is not doing blocking computation.
Non-blocking:
[aa][bb][cc][/aa][/cc][/bb][dd][ee][ff][gg][/dd][/ff][/gg][/ee]
Blocking-threaded: [aa]------------------------[/aa][ff]----------------------[/ff]
[bb]------------------------[/bb][gg]----------------------[/gg]
[cc]------------------------[/cc][ee]----------------------[/ee]
[dd]------------------------[/dd]
Depending on how many threads you can get going at once, you may be able to achieve comparable performance doing threading, but nonblocking is basically leaving 0 time on the core wasted and limited to the speed of the event loop.And then on top of that, clustering module is used to do the same thing on every core.
Re: JavaScript is Eating the World
#197Earlier quoted context omitted.
Do you deny that implementations are part of the language? If the Javascript specification left this out, what other implementation gotchyas exist for them to exploit?
Few but you likely consider the implementation part of the language.
Re: JavaScript is Eating the World
#198The more time goes by the more I feel crazy for missing whatever would motivate people to use js for anything more than is strictly necessary. Single threaded server??? I mean come on man, I understand you don't need parallelism for a lot of use cases but even if that fits your situation why javascript? It can't be that hard using a different language. I refuse to believe that.
Re: JavaScript is Eating the World
#199The other day I managed to freeze my computer -- such that I did not even have access to the SysReq key, by stupidly running while (true) { var d = new Date; e.textContent = d.toLocaleString(); } I immediately realised my stupidity, and closed the tab. Shortly after, my mouse froze up, then my keyboard access, and eventually my entire access. Rather than just freezing Xorg as I had initially suspected, it froze my en…
I would have thought that all competent browsers run tabs in unique processes.
Re: JavaScript is Eating the World
#200The fact that JavaScript and the web platform kind of sucks while at the same time being "unavoidable" is why it's so good. It forced a lot of very smart people and a lot of eyes onto the platform to try and find solutions within the extremely restrictive "box" to these problems. How do you solve the API issues when you don't control the platform? How do you solve for perf when things can't be installed? How do you s…
"Very smart people" are great at twisting and stretching and finding the most optimal possible solution within the restrictive box that you give them. But they're not always great at stepping back and asking bigger questions:
* Why was the box put there in the first place?
* Doesn't my solution defeat the point of the box?
* What are the alternatives to the box?
* Is it possible that I'm wasting tons of time and energy on a problem that would be trivial outside of the box?