Re: =[xhr]

GOTOs have their uses, as well.  Try to write hardware control code or 
even a decent operating system without one.  Abuse of GOTO by persons not 
aware of the pros/cons can be a nightmare, however, I haven't seen a GOTO 
in anyone's code since 1992 (I began programming DB applications in the 
ISAM era 1983 when GOTO's were quite common.)

At one point, I had access to Windows v2.1 code and found some very nasty 
GOTO logic everywhere (jumping out of  3rd-level nested switch case to a 
section of code in another case in the top-level switch.  Dang hard to 
follow the coding logic.)  An old mainframe guy (Unisys 1100) explained to 

me the when and why to use GOTOs.  It is a very efficient branching 
directive at the compiled code level.



From:   David Bruant <bruant.d@gmail.com>
To:     Austin William Wright <aaa@bzfx.net>, Glenn Maynard 
<glenn@zewt.org>, 
Cc:     nmork_consultant@cusa.canon.com, "Tab Atkins Jr." 
<jackalmage@gmail.com>, public-webapps <public-webapps@w3.org>
Date:   08/02/2014 03:41 AM
Subject:        Re: =[xhr]



Le 02/08/2014 11:11, Austin William Wright a écrit :
> Maybe there's another reason: Good idea or no, removing this feature 
> DOES break reverse compatibility with the de-facto behavior of many 
> Web browsers.
Everyone who wants sync xhr to disappear is well-aware. That's the 
reason it hasn't been removed yet.

Just as a reminder, we live on Planet Earth where the distance between 
two computers who want to communicate with one another can be 20.000km. 
A signal at speed light takes 60ms. But our network isn't either at 
speed light nor in straight line, so the delay is easily multiplied by 
20 and that's very optimistic. And that's just the latency. Bandwidth 
considerations and data processing times aren't free.
On the other hand, we're human beings and notice 100ms delays and all 
evidence converge in the direction of saying that human beings are 
frustrated when they feel a delay, so making people wait is terrible. 
(interesting talk which discusses perceived performance at one point 
http://vimeo.com/71278954 )
Sync xhr forces a delay and there is no way around that, ergo, it's 
terrible.

I'm probably not old enough to accurately make this comparison, but 
blocking I/O looks like it's 2010-era GOTO. I heard when higher-level 
programming came around, some people were strong defenser of GOTO. Now, 
most people have moved to higher-level constructs.
I think the same fate is waiting for blocking I/O.

David

Received on Monday, 4 August 2014 13:43:04 UTC