Results 1 to 12 of 12

Thread: C# is better than VB

  1. #1

    Thread Starter
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327

    Unhappy C# is better than VB

    I'm sure there's a bunch of people that look at that title and think this is a thread with another religious argument.

    Far from it. This is facts. This goes beyond the tired arguments about syntax preference and with statements.

    I realize this is probably old news to most of you:
    Future features of C#

    New features being added to C# were discussed by C#'s creator at OOPSLA in November. From talking to some guys on the design team, these features are just the beginning to changes / additions being made to C#. Note! These valuable new features are not going to be in VB. And, in the future, C# will become more and more of the workhorse - a language that the more serious programmers will use. VB will get new features more geared towards rapid development.

    This isn't a flame starter...It's just an FYI.
    -scott
    he he he

  2. #2
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    I don't quite understand how their going to do this!

    To add this functionality to C# means to add it to the .NET framework. If its added to the framework, VB.NET can take advantage of it. Unless their going to make C# a .NET-independant language? But if thats the case, why wouldn't people just use C++ instead?

  3. #3

    Thread Starter
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    As you know, there is a variety of things in the framework that are not used in one language or another. For instance, C# can user pointers, while VB cannot. Also, VB can use optional parameters, while C# cannot. These are design decisions made by the language architects, not a restriction in the framework.

    Gererics will be added to the framework. You can see that the nature of the annoucement was to get feedback before seeking ECMA approval on the additions. However, the VB design team will not implement generics in VB.

    It's a philosophical decision from the different design teams. C# will gain more power at the cost of more complexity. VB will gain more RAD capabilities at the cost of power. The underlying framework will of course be the same...
    -scott
    he he he

  4. #4
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    I always thought that optional parameters turned one procedure into two or more overloaded procedures, therefore its not really an added functionality.

    As for pointers, VB.NET does support them, but in a round-about way (passing variables ByRef, for example). I think C-style pointers were left out intentionally because their only beneficial in very specific circumstances, and they can cause many problems that can be very difficult to debug (memory leaks, for example).

    Correct me if I'm wrong though, I'm only speculating here!

    EDIT:

    Here's something I saw on the MSDN documentation just now

    A managed pointer, also known as a __gc pointer, is a new type of pointer available to managed applications. Managed pointers are references to a managed block of memory from the common language runtime heap. Automatic garbage collection is performed on this heap. Managed pointers are generated for method arguments that are passed by reference. Some languages provide other ways of generating managed pointers. Only managed pointers are CLS-compliant.

    An unmanaged pointer is the traditional C++ pointer to an unmanaged block of memory from the standard C++ heap. Because unmanaged pointers are not part of the Common Language Specification (CLS), your language might not provide syntax to define or access these types. See the documentation for your language for information on support for unmanaged pointers.
    Last edited by Hu Flung Dung; Feb 8th, 2003 at 02:48 PM.

  5. #5
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Don't forget vb.net doesn't support operator overloading..

  6. #6
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    Originally posted by Lethal
    Don't forget vb.net doesn't support operator overloading..
    And the benefit of operator overloading is...?

  7. #7
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    I agree. C# is better than VB.NET
    Dont gain the world and lose your soul

  8. #8
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Originally posted by Hu Flung Dung
    And the benefit of operator overloading is...?
    Well, you can control how operators are used when you create custom objects. When you add two int's, you use the + sign and the two int's are added together like you would think.

    Now, imagine you have your own custom objects. These are cow objects. Now, lets say that these cow objects can hold how much milk each cow object has. Since this is the main purpose of the cow object (to hold the milk value), you may want to make it easier to add each of the cows milk values. But if you put cow+cow, you don't get what you would expect. That is, unless you overload the + operator. You can overload the + operator, and have it automatically add each cow's milk value without having to explicitly add the properties. Of course, you can go MUCH more in depth with it though.

    This is overly simplified of course, but in programming, it is invaluable if you want to seriously develop objects and make it easier on yourself later or other developers. Just think about it, the int, string, and other classes all overload the operators to make them do what we like. Could you imagine having to type int.Value + int.Value just to add two integers!

  9. #9

    Thread Starter
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327

    Wink

    Anyway, my point was that just because a functionality is in the framework does not mean each language supports it.

    This being said, it will happen that VB and C# begin to diverge. They are identical in many ways now. This will be less and less the case in the future. C# will have more power and VB will have more RAD stuff.
    -scott
    he he he

  10. #10
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    Ayecharumba, No Pimentos!!!!

    Their killing the entire purpose for even having a framework!

  11. #11
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    correct me if i'm wrong but much of the functionality that they want to add will be things that will make no change in run time..like templates..templates if i am not wrong are just "overloaded" functions/classes that the compiler turns to each data type in compile time
    \m/\m/

  12. #12
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    No, not overloaded. Templates are what the word says: templates.
    You stuff in data types and maybe constants and the compiler generates real code. Hey, you could do quite similar things in an advanced preprocessor, but it's more comfortable to have it directly in the compiler.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width