• (cs) in reply to Just Macros
    Just Macros:
    Reading code: C# problems:
    • When you see a } you don't know if it's ending a function, a property, an if, a switch...

    That's harder to read.

    Since you read from left to right, when you see a line starting: [type] [identifier] (as in "int foo...") you have to read the entire line to know if it's a function or a variable. (Today C# is approaching VB. Now you have "var" in C#)

    switch+break statement vs select case: Switch it's an old prehistoric dinosaur. When C was compiled to assembler, "switch/break" makes sense (if you know what a conditinal jmp is, you'll understand) But today it's a very bad tool, at least compared to VB select case.

    Quit the "VB is for kids!" nonsense. You're revealing yourself as an ignorant. c# programmers are not c programmers. if you don't what char **p; means: you're in the managed NET league, where c# and VB.NET are almost the same thing: just "flavors" over MSIL+NET. In this regard, VB is a more powerful tool.

    Please don't ruin a good rant with a technical error. "var" showed up in C# at the same time type inference showed up in VB. Neither was playing catch-up. Also, I use VB more than C# and I know what **p means, I have even relied on that knowledge a few time in VB, that's why System.IntPtr exists.
  • Kirby L. Wallace (unregistered) in reply to dan

    Here's my two cent's worth on the C vs VB coding styles.

    Now, finally, a few years after being dragged kicking and screaming into the C syntax world, I too prefer the C syntax style.

    However, there are a couple of things about it I do not like. VB's verbosity actually makes code reading easier via really useful visual clues.

    For instance. You are many, many lines of code cown into the listing. Which gives you a better idea of where to insert a "break;"?

    :
    :
    :
                }
            }
        }
    }
    

    Or

                end if
    
            end if
    
        next i
    
    end do
    
    

    When the closing "}" is many lines away, and if you are having to rely on accurate indentation to find the opening "{".... VB Wins in this one. The IDE can help with brace matching highligting, but only so much. You still end up scrolling up and down.

    SECOND:

    I still hate the fact that my object reference is a VARIABLE number of places into the statement. It's in a different place each and every stinking time! It makes quick scanning impossible:

    TreeMap<String, String> myTreeMap = new TreeMap....;
    String strThis = "this is the string";
    int x = 0;
    MapiMailConnector thisConn = new MapiMailConnector(xyz);
    

    Or

    Dim myMap as MapThingy
    Dim strThis as String
    Dim x as integer
    Dim thisConn as MapiConnectorThing
    

    All my variables or object refreence names begin in a neat, easily scanable straight line in the same position - col 5.

    I hate that my eye has to determine where in each and every line the object reference is actually found. "It's here, no over there, wait, no there it is..."

    VB syntax, "Ok. I got myMap, strThis, x and thisConn to work with..."

  • Kirby L. Wallace (unregistered) in reply to Jaime

    Wow. I had no idea your comment was on the record already! Exactly what I was saying. ;-)

  • (cs) in reply to English Man
    English Man:
    If you think that makes a sweet comeback, more fool you.
    What is the subject in that sentence? Or the verb?
    Jaime:
    The right answer to me is to make a string a value type,
    Once again, no it's not. Copying every string on the stack every time you call a function is very, VERY bad for performance. I'm glad you don't write the language.
    callcopse:
    Lord almighty, not another of these pissing contests? [...] <shakes head at squawking, snobby noobs>
    Yes, you sure kept your head up on that one!
    Kirby L. Wallace:
    Here's my two cent's worth on the C vs VB coding styles. [...] For instance. You are many, many lines of code cown into the listing. Which gives you a better idea of where to insert a "break;"?
    :
    :
    :
                }
            }
        }
    }
    

    Or

                end if
    
            end if
    
        next i
    
    end do
    
    

    When the closing "}" is many lines away, and if you are having to rely on accurate indentation to find the opening "{".... VB Wins in this one. The IDE can help with brace matching highligting, but only so much. You still end up scrolling up and down.

    You're doing it wrong.

  • bla (unregistered)

    The Real WTF is VB

  • (cs)
    IsDemo(600000) = True

    Hey! That is not VB code, it is Scala code!

    val IsDemo = scala.collection.mutable.Map[Int, Boolean]()
    val True = true
    IsDemo(600000) = True
    println(IsDemo) // prints: Map(600000 -> true)
    
  • Rubberduck (unregistered) in reply to Larry David Jr

    [Insert any anonymous function here.]

Leave a comment on “Property Basics”

Log In or post as a guest

Replying to comment #:

« Return to Article