Search Results

Search found 2 results on 1 pages for 'zzzzbov'.

Page 1/1 | 1 

  • Why don't languages use explicit fall-through on switch statements?

    - by zzzzBov
    I was reading Why do we have to use break in switch?, and it led me to wonder why implicit fall-through is allowed in some languages (such as PHP and JavaScript), while there is no support (AFAIK) for explicit fall-through. It's not like a new keyword would need to be created, as continue would be perfectly appropriate, and would solve any issues of ambiguity for whether the author meant for a case to fall through. The currently supported form is: switch (s) { case 1: ... break; case 2: ... //ambiguous, was break forgotten? case 3: ... break; default: ... break; } Whereas it would make sense for it to be written as: switch (s) { case 1: ... break; case 2: ... continue; //unambiguous, the author was explicit case 3: ... break; default: ... break; } For purposes of this question lets ignore the issue of whether or not fall-throughs are a good coding style. Are there any languages that exist that allow fall-through and have made it explicit? Are there any historical reasons that switch allows for implicit fall-through instead of explicit?

    Read the article

  • How can I block w3schools from appearing in my google search results?

    - by zzzzBov
    A while ago I got fed up with continuously finding w3schools in my search results when I wanted detailed, technically correct information. To fix this without having to continuously append -site:w3schools.com to my search queries, I used google's Manage Blocked Sites page. For a while this worked perfectly, no more results from unwanted sites. Recently, however, I've been seeing w3schools litter my search results. Is there a new way to remove a site from google search results? -or- Is this just a bug that I should report?

    Read the article

1