Thread: Is this really true ?

  1. #46
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    VB keeps students mind off the structure of the program, it just focuses on the input and output of the program.
    This is patently false. I remember dim'ing a few things in VB, and it does have flow control structures. The difference between VB and everything else is that VB is event driven. So you focus on forms and their events (which, easily call your own hand rolled subroutines) instead of functional decomposition or OO design.

  2. #47
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by Swoorup View Post
    We can use it without grasping the "bad habits", but it is difficult to do so, while C/C++ on the other hand forces us to avoid bad practices.
    That is not true. There are plenty of bad habits exhibited in C/C++ as well. It's just a VB person will develop a very different set of bad habits than will a C/C++ person.

    Some good habits in a VB programmer are bad habits for a C/C++ programmer, and vice versa.

    Quote Originally Posted by Swoorup View Post
    My friends don't ever declare variables, bad naming of the variables( haven't realized how the same block and small-ed lettered variable would behave).
    Granted, it is not possible to get away with an undeclared variable in C/C++, but a lot of C/C++ programmers routinely name their variables quite badly.

    Quote Originally Posted by Swoorup View Post
    Nobody even realizes about the difference between passing by ref and by value.
    You'd be surprised how often a C/C++ person fails to understand that difference. I've seen professionals make serious mistakes based on that.

    Quote Originally Posted by Swoorup View Post
    VB keeps students mind off the structure of the program, it just focuses on the input and output of the program. While a language like C considers optimization, the flow of the program, its implementation and forces us to consider how the same code would run on other platforms. So when a person chooses first to learn VB, it keeps his/her mind off these things, just makes him/her focus on the outcome. And the same behavior is developed through his VB years.
    Yes, C and C++ "considers" optimisation. The flip side is that a lot of C/C++ people indulge in premature optimisation. They will spend a week hand-crafting some excruciatingly cryptic bit of code, only to find in testing that it lops 2.4 milliseconds of execution time from the program, if they run it more than an hour. Although most don't realise the benefits of their efforts are that small, because they don't actually test to find out.

    A primary source of problems in C/C++ code is incorrect flow control.

    C/C++ does not force anyone to consider portability of their code. In fact, it is more common to encounter people using compiler-specific extensions, while insisting their code is portable because they wrote it in C or C++.

    And don't even get me started on how many C/C++ folks misuse pointers.

    I'm not trying to discourage you from learning C/C++. In fact, I think it would be good for you. But don't make the mistake of assuming that C or C++ provides a panacea to VB's faults.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #48
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by grumpy View Post
    Some good habits in a VB programmer...
    I'd say that there are none. being a VB programmer is a bad habit :P

    just my opinion.

  4. #49
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Elkvis View Post
    I'd say that there are none. being a VB programmer is a bad habit :P
    Haha. This is probably harsh, but it's just funny anyway

    Bad &/| good habits are not specific to any language. Misusing pointers? That can be found in languages that don't explicitly support them, (like those that only use reference). Not liking to declare variables? That can be a problem in C(++), with to much variable re-use. Just as knowing a language != knowing how to program in it. Habits whether good or bad are detached from any language (unless of course it just can't be applied). For example, I personally strongly dislike garbage collection, but not because it "encourages bad habits", it's style just doesn't work with me.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. x = x < y < 2; WHY IS THIS ALWAYS TRUE!?
    By sh4k3 in forum C Programming
    Replies: 5
    Last Post: 06-08-2007, 01:00 AM
  2. Is this true about Dev-C++?
    By RealityFusion in forum Tech Board
    Replies: 7
    Last Post: 08-22-2003, 03:40 PM
  3. Is it true that...
    By Shadow12345 in forum C# Programming
    Replies: 4
    Last Post: 09-15-2002, 11:52 PM
  4. is it true
    By Klinerr1 in forum C++ Programming
    Replies: 3
    Last Post: 07-16-2002, 02:21 AM