Only an ASP developer...



  • This is just beautiful. It's really just a small snippet as it goes on throughout this guy's code. Yes, these are consecutive lines.

    <% while not dataRS.eof %>
    <% orgID = dataRS("nOrg_Id")%>
    <% if not orgID = "" THEN %>
    <%	  if not  curBNRId & curRPD =  dataRS("nRPD_ID") & dataRS("cRPD_Code")  then %>
    snip... and it goes on
    

    And then, in various places, we have nice little constructs like this:

    <td><%=0%> </td>
    

    ... and ...

    <td>
    <%="WASH GRC"%>
    </td>

    You know, just in case the value of [i]zero[/i] changes in VBScript...



  • Wow man!

     

    PS: I'm tired of 'brillant' for once. 



  • I don't think you can call whoever wrote that crap a developer.



  • Hey, it's like C syntax, only doubly so. Let's markboth the end AND the beginning of every line with something pointless!

    New line? Bah! That's just not enough!



  • [quote user="campkev"]I don't think you can call whoever wrote that crap a developer.[/quote]

    More to the point, I don't htink this has anything to do with ASP.

    I've seen PHP code that's worse. 



  • [quote user="RayS"]

    Hey, it's like C syntax, only doubly so. Let's markboth the end AND the beginning of every line with something pointless!

    New line? Bah! That's just not enough!

    [/quote]

    In a free form language, that is one where the quantity of whitespace between tokens can be anything greater or equal to one space, I think you absolutely need something to mark the end of statements.  If you just rely on newlines then you get something like python where whitespace is important.

    As an example consider this two line code, which could occur if b and c were very long names or function calls and needed a line break.

     a = b

        +c;

    Both lines are valid statements on their own (admittedly the second does little) but the semicolon tells the compiler the statement continues on the next line. 



  • [quote user="MET"]

    As an example consider this two line code, which could occur if b and c were very long names or function calls and needed a line break.

     a = b

        +c;

    Both lines are valid statements on their own (admittedly the second does little) but the semicolon tells the compiler the statement continues on the next line. 

    [/quote]
    Nope, the second line isn't a valid statement, at least not in C. There is no unary + in C.



  • [quote user="MET"][quote user="RayS"]

    Hey, it's like C syntax, only doubly so. Let's mark both the end AND the beginning of every line with something pointless!

    New line? Bah! That's just not enough!

    [/quote]

    In a free form language, that is one where the quantity of whitespace between tokens can be anything greater or equal to one space, I think you absolutely need something to mark the end of statements.  If you just rely on newlines then you get something like python where whitespace is important.

    As an example consider this two line code, which could occur if b and c were very long names or function calls and needed a line break.

     a = b

        +c;

    Both lines are valid statements on their own (admittedly the second does little) but the semicolon tells the compiler the statement continues on the next line. 

    [/quote]

    Without wanting to break out into a language religious war...

    As much as I'm not fond of a lot of VB syntax, I really think they got it right with the statement separators. The common case scenario is "one line, one statement". With this in mind you cater to the common scenario. Since you're putting that line break in between statements anyway, you may as well save effort and typing by having it operate as the statement separator also. You then cater separately for the less frequent cases with line continuation " _" and multi statement per line ":" characters.

    I'd like C syntax (no DIM this DIM that) without the dumb redundant semicolons.

    When 90%+ of semicolons are followed by a newline anyway, surely I'm not the only one that thinks "WTF? What's the point?" 

    Still, either was is better than this bozo's abuse of ASP to the point of having start "<%" and end "%>" statement strings in addition to the newline!
     


Log in to reply