Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Blasphemy

Blasphemy

Scheduled Pinned Locked Moved The Lounge
csharpquestionc++asp-netcom
45 Posts 24 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Christopher Duncan

    Or so I'm sure it will seem to the faithful... I started in C back in the late 80s, moving to C++ when MSVC 1.0 came out. Never spent any significant time with VB (never installed it) because I was writing desktop applications and particularly in the early days, the advantages of C++ over VB were obvious. I like a language that doesn't say no. These days, I have to do a bit of web work here and there. Because the first shopping cart system I bought (before my current love affair with www.BvSoftware.com[^]) was based on classic ASP and VB script, that's what I got used to working with as I had to do significant code modifications to it. Compared to ASP.NET, classic ASP is a nightmare. So, I'm now moving towards ASP.NET in my web work. That of course raises the question of which language to use, VB or C#. The haughty, arrogant C++ coder in me scoffs at the thought of using VB. However, I'm somewhat familiar with it. C# requires extra time out of my life that I don't currently have to learn another language. But of course, C# is the new "cool" language. Here's my question. VB and C# are both managed languages talking to the same .NET runtime with the same restrictions. They strike me as nothing more than different colored wrapping paper around the same box. Why should I stop what I'm doing, give up the two hours I sleep each night and learn C#? What does it bring to the party beyond a familiar syntax that VB doesn't? Is there anything VB does that C# does better? Is there anything C# does that VB can't? Is there any real, functional reason to use one over the other? VB programmers take a lot of ribbing around here, and for desktop coding I might even join the fray. But I don't have any time to spare, and I'm not going to learn a new language just for the ego of saying I know the one that's currently trendy and popular. If I was building a resume, that would be a compelling reason, but I'd rather be drug across carpet tacks and dipped in rubbing alcohol than do web development for a living, so I don't care about that. All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. I'm not above giving up those two hours of sleep, but damned if I'll do it without a compelling reason. And the fact that Archer is a renowned C# guru and

    W Offline
    W Offline
    wb
    wrote on last edited by
    #14

    IMO there is no difference.:eek:

    1 Reply Last reply
    0
    • C Christopher Duncan

      Or so I'm sure it will seem to the faithful... I started in C back in the late 80s, moving to C++ when MSVC 1.0 came out. Never spent any significant time with VB (never installed it) because I was writing desktop applications and particularly in the early days, the advantages of C++ over VB were obvious. I like a language that doesn't say no. These days, I have to do a bit of web work here and there. Because the first shopping cart system I bought (before my current love affair with www.BvSoftware.com[^]) was based on classic ASP and VB script, that's what I got used to working with as I had to do significant code modifications to it. Compared to ASP.NET, classic ASP is a nightmare. So, I'm now moving towards ASP.NET in my web work. That of course raises the question of which language to use, VB or C#. The haughty, arrogant C++ coder in me scoffs at the thought of using VB. However, I'm somewhat familiar with it. C# requires extra time out of my life that I don't currently have to learn another language. But of course, C# is the new "cool" language. Here's my question. VB and C# are both managed languages talking to the same .NET runtime with the same restrictions. They strike me as nothing more than different colored wrapping paper around the same box. Why should I stop what I'm doing, give up the two hours I sleep each night and learn C#? What does it bring to the party beyond a familiar syntax that VB doesn't? Is there anything VB does that C# does better? Is there anything C# does that VB can't? Is there any real, functional reason to use one over the other? VB programmers take a lot of ribbing around here, and for desktop coding I might even join the fray. But I don't have any time to spare, and I'm not going to learn a new language just for the ego of saying I know the one that's currently trendy and popular. If I was building a resume, that would be a compelling reason, but I'd rather be drug across carpet tacks and dipped in rubbing alcohol than do web development for a living, so I don't care about that. All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. I'm not above giving up those two hours of sleep, but damned if I'll do it without a compelling reason. And the fact that Archer is a renowned C# guru and

      N Offline
      N Offline
      Nic Rowan
      wrote on last edited by
      #15

      Ok, I may as well "come out"... (First let me tell you a bit about how I started programming to try and defend myself here ;p) I started programming pascal on my own back in about 94, from there I moved to inline and assembler for a while. University was lousy and carried on teaching Pascal so I tought myself C++. I did C++ a number of years after that. Then I got a job programming VB.NET at a company here in S.A. doing RAD development. I picked it up hell'o'va quickly and have been using it for ASP.NET for the last year or so. I honestly dont get why people rag it so much. It's not that bad. VB 6.0 wasn't great I'll be the first to admit - I've had to try fix other peoples shoddy code on bad projects using VB 6.0 far to often but VB.NET aint half bad. Maybe I'll convert to C# when I have time but at the moment there's no need. Plus I'm getting paid more than all my C++ programming buddies so that usually shuts them up ;p


      Reason to smile: Every 7 minutes of every day, someone in an Aerobics class pulls a hamstring. Life is too short to be taken seriously. -- Oscar Wilde


      1 Reply Last reply
      0
      • C Christopher Duncan

        Or so I'm sure it will seem to the faithful... I started in C back in the late 80s, moving to C++ when MSVC 1.0 came out. Never spent any significant time with VB (never installed it) because I was writing desktop applications and particularly in the early days, the advantages of C++ over VB were obvious. I like a language that doesn't say no. These days, I have to do a bit of web work here and there. Because the first shopping cart system I bought (before my current love affair with www.BvSoftware.com[^]) was based on classic ASP and VB script, that's what I got used to working with as I had to do significant code modifications to it. Compared to ASP.NET, classic ASP is a nightmare. So, I'm now moving towards ASP.NET in my web work. That of course raises the question of which language to use, VB or C#. The haughty, arrogant C++ coder in me scoffs at the thought of using VB. However, I'm somewhat familiar with it. C# requires extra time out of my life that I don't currently have to learn another language. But of course, C# is the new "cool" language. Here's my question. VB and C# are both managed languages talking to the same .NET runtime with the same restrictions. They strike me as nothing more than different colored wrapping paper around the same box. Why should I stop what I'm doing, give up the two hours I sleep each night and learn C#? What does it bring to the party beyond a familiar syntax that VB doesn't? Is there anything VB does that C# does better? Is there anything C# does that VB can't? Is there any real, functional reason to use one over the other? VB programmers take a lot of ribbing around here, and for desktop coding I might even join the fray. But I don't have any time to spare, and I'm not going to learn a new language just for the ego of saying I know the one that's currently trendy and popular. If I was building a resume, that would be a compelling reason, but I'd rather be drug across carpet tacks and dipped in rubbing alcohol than do web development for a living, so I don't care about that. All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. I'm not above giving up those two hours of sleep, but damned if I'll do it without a compelling reason. And the fact that Archer is a renowned C# guru and

        T Offline
        T Offline
        Tom Archer
        wrote on last edited by
        #16

        Actually having used about 5 OS's (I'm only counting Windows once) and about 10 languages professionally, I've always stated that you should use the tool that works best in terms of developer productivity and the company's future (with regards to things such as code maintenance and ease of finding developers for the system). You'll remember that I was first an OS/2 programmer years before Windows was even a viable development platform. However, I switched to Windows programming for the simple reason that it was more productive and I could see that despite my personal feelings about OS/2's superiority, Windows was going to win the OS war. Therefore, choosing an OS with the better future was the correct choice for my client. Regarding selecting C# or VB, I would look at how the advantages of each language play out for your particular situation:

        VB Advantages

        • Most .NET books (especially in the area of ASP.NET) are focused on the larger target audience - VB

        C# Advantages

        • Has a syntax that is more familiar to C++ developers
        • Most "hard-core", or advanced, articles and books use C#. Therefore, when you run into an especially difficult problem, the source code will probably be in C#
        • There are some things that VB.NET cannot do. Since I don't use the language, you'd need to frequent those boards and sites to see specifics. However, I do know that the VB coders have complained since the release of .NET that despite the promise that all languages will be equal, C# still gets preferential treatment in terms of functionality.
        • Pursuant to my previous point about C# having more capability, there is a feeling among some that C# will become Microsoft's language of choice for .NET development. I don't VB.NET will be dropped, but that could mean that designers and other tools for VS.NET will be developed quicker for C#
        • As various news media have pointed out, while you can do about 95% of the things in VB that you can in C#, there is still the attitude in the marketplace that C# is a "real" language and therefore C# programmers command a higher salary.

        Will you be more productive with one or the other? Depends. It seems like you're already comfortable with VB.NET so that doesn't seem like an issue for you. I would be more concerned with issues of getting to know C# in terms of future marketability. The bottom line is that I've always used the best tool for the job at the moment so that would be my determining factor o

        C 1 Reply Last reply
        0
        • A abc

          Russell Morris wrote: you must manually declare overloaded functions with the Overload keyword, due to case insensitivity VB (I believe) cannot always consume CLR compliant code because the CLR is case sensitive Case insensitivity seems to be an advantage, it makes the intellisense a lot more useful and saves a lot typing. Of course if someone stupid enough wants to use variable (or function) names that only differ in case, then the top priority should be getting rid of that person instead of making the code work. ;P Russell Morris wrote: VB.NET's Integer is 16 bits instead of 32 Totally false. Were you a VB programmer in disguise? ;P Russell Morris wrote: C# was built from the ground up as the high-level language to target the CLR - the other .NET-targetting languages have been hacked in. New doesn't mean better or useful. Without the support for other languages, .NET would be dead already.

          R Offline
          R Offline
          Russell Morris
          wrote on last edited by
          #17

          abc wrote: Totally false. Were you a VB programmer in disguise? Doh! I was looking at VB6 docs as I was writing that :-O:laugh: -- Russell Morris "Have you gone mad Frink? Put down that science pole!"

          1 Reply Last reply
          0
          • D David Chamberlain

            [start sarcasm/reality] You can rationalize it all you want, and you can spend countless hours trying to justify your decisions to yourself only so that you aren't so scared when you have to try to justify them to someone else. But, the bottom line is that you are a professional who is trying to get a job done, and as such, you must use the tools you have in your toolbox. They may not be the best tools, but they are all you've got, so your job is to use what you have to the best of your ability to reach the end result. You know that. You've written about it. And when you do end up using VB, don't admit it in public and don't talk too much about it around here. [end sarcasm] Dave "You can say that again." -- Dept. of Redundancy Dept.

            J Offline
            J Offline
            Jim Crafton
            wrote on last edited by
            #18

            David Chamberlain wrote: And when you do end up using VB, don't admit it in public and don't talk too much about it around here. ROTFLMAO! :) ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!

            1 Reply Last reply
            0
            • D Daniel Turini

              Christopher Duncan wrote: All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. Ok, I'll bite it. 1. C# can create unsafe code. This means you have pointers, (almost) real pointers. This also means you can stackalloc memory, meaning much faster code. 2. C# resembles C++ syntax. IMHO, its much more beautiful. 3. C# is a type-safe language, VB.NET is not. [plug]VB.NET has some patological syntax ambiguities, which I digress about in my latest article[^], although the focus of the article is not this. [/plug] 4. C# have fine control over integer operation checking. 5. C# have the using statement for deterministic calling of Dispose(). If you don't know what it is, it means no handle leaks, if properly used. Only the mere existance of this statement can be the whole purpose of coding in C#. Without it, you'll need to resort to ugly try/finally in VB.NET. 6. C# generate doesn't generate nops on IL (VB needs it for setting "fake" breakpoints on statements that don't generate code). This means shorter IL. A 1Mb DLL in VB can be reduced to 900Kb in C#. 7. C# has the XML documentation feature. 8. C# can generate, right from the IDE, strong-named interop COM wrappers. With VB.NET, you'll need to resort to some ugly batch files with TLBIMP. 9. C# has "out" parameters. I love them. 10. Fine control of integer overflow checking with the "checked" and "unchecked" keyword. 11. The foreach statement on C# automatically calls Dispose on IDisposable enumerators. VB.NET don't. 12. C# has boolean short circuit. VB.NET has the ugliest sintax ever for this (AndAlso, OrElse). 13. C# has the :? operator. VB.NET has the ugly IIf, whith its collateral effects. 14. C# will have templates (aka generics) and other niceties on the next version. VB.NET will only be able to consume it, which says a lot about its future as a language. 15. Arrays in VB.NET are a nightmare. Redim should be ripped off. 16. Null, Nothing, Empty, "": the 4 constants of the apocalypse. 17. Me, MyBase, MyClass: the new 3 additions to the constants of the apocalypse. 18. Convoluted OOP syntax: a candy for those, without looking on MSDN who can tell me what's the difference between MustInherit and MustOverride. If you do,

              J Offline
              J Offline
              Jim Crafton
              wrote on last edited by
              #19

              Some should post this somewhere in plain view as reasons to just pithc VB.Net period! Great reasons! ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!

              1 Reply Last reply
              0
              • C Christopher Duncan

                Or so I'm sure it will seem to the faithful... I started in C back in the late 80s, moving to C++ when MSVC 1.0 came out. Never spent any significant time with VB (never installed it) because I was writing desktop applications and particularly in the early days, the advantages of C++ over VB were obvious. I like a language that doesn't say no. These days, I have to do a bit of web work here and there. Because the first shopping cart system I bought (before my current love affair with www.BvSoftware.com[^]) was based on classic ASP and VB script, that's what I got used to working with as I had to do significant code modifications to it. Compared to ASP.NET, classic ASP is a nightmare. So, I'm now moving towards ASP.NET in my web work. That of course raises the question of which language to use, VB or C#. The haughty, arrogant C++ coder in me scoffs at the thought of using VB. However, I'm somewhat familiar with it. C# requires extra time out of my life that I don't currently have to learn another language. But of course, C# is the new "cool" language. Here's my question. VB and C# are both managed languages talking to the same .NET runtime with the same restrictions. They strike me as nothing more than different colored wrapping paper around the same box. Why should I stop what I'm doing, give up the two hours I sleep each night and learn C#? What does it bring to the party beyond a familiar syntax that VB doesn't? Is there anything VB does that C# does better? Is there anything C# does that VB can't? Is there any real, functional reason to use one over the other? VB programmers take a lot of ribbing around here, and for desktop coding I might even join the fray. But I don't have any time to spare, and I'm not going to learn a new language just for the ego of saying I know the one that's currently trendy and popular. If I was building a resume, that would be a compelling reason, but I'd rather be drug across carpet tacks and dipped in rubbing alcohol than do web development for a living, so I don't care about that. All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. I'm not above giving up those two hours of sleep, but damned if I'll do it without a compelling reason. And the fact that Archer is a renowned C# guru and

                J Offline
                J Offline
                John Honan
                wrote on last edited by
                #20

                Christopher Duncan wrote: tell me why, in practical terms, C# is more powerful than VB for .NET web apps. Over the past 10 years I've coded in Delphi and VB. Object Pascal is an elegant language and I love it, but VB is where the contracts and the money was. No point sitting at home waiting for the phone to ring with a Delphi offer when there were a hundred VB contracts waiting to be filled. :cool: From there the obvious transition was to VB.NET. Not because I am (or ever was) a big fan of VB. (I can see its shortcomings, and it annoys me no end that script kiddies pick it as their language of choice and pretend they are 'programmers') But for the simple fact I'm not going to sit here for 2 months trying to learn the intricacies of a new language (C#) when I have people breathing down my back to deliver their app. Yes, C# is a lovely language, and I do dabble in it, and I'd love to write all my code in it. But, I don't have the time to go through the pain of re-learning a new language - with little end benefit. Right now I can sit down and churn out VB.NET code that I know will work, without having to really think about it. I've done it a hundred time before in VB. I don't want to have to check syntax, manuals, and examples for even the most simple lines of C# - My memory isn't what is used to be either! :~ The .Net framework has given me even less reason to move to a new language. On .Net all things are equal, regardless of whether you code in C# or QBASIC.Net... :laugh: John www.silveronion.com[^]

                C 1 Reply Last reply
                0
                • C Christopher Duncan

                  Or so I'm sure it will seem to the faithful... I started in C back in the late 80s, moving to C++ when MSVC 1.0 came out. Never spent any significant time with VB (never installed it) because I was writing desktop applications and particularly in the early days, the advantages of C++ over VB were obvious. I like a language that doesn't say no. These days, I have to do a bit of web work here and there. Because the first shopping cart system I bought (before my current love affair with www.BvSoftware.com[^]) was based on classic ASP and VB script, that's what I got used to working with as I had to do significant code modifications to it. Compared to ASP.NET, classic ASP is a nightmare. So, I'm now moving towards ASP.NET in my web work. That of course raises the question of which language to use, VB or C#. The haughty, arrogant C++ coder in me scoffs at the thought of using VB. However, I'm somewhat familiar with it. C# requires extra time out of my life that I don't currently have to learn another language. But of course, C# is the new "cool" language. Here's my question. VB and C# are both managed languages talking to the same .NET runtime with the same restrictions. They strike me as nothing more than different colored wrapping paper around the same box. Why should I stop what I'm doing, give up the two hours I sleep each night and learn C#? What does it bring to the party beyond a familiar syntax that VB doesn't? Is there anything VB does that C# does better? Is there anything C# does that VB can't? Is there any real, functional reason to use one over the other? VB programmers take a lot of ribbing around here, and for desktop coding I might even join the fray. But I don't have any time to spare, and I'm not going to learn a new language just for the ego of saying I know the one that's currently trendy and popular. If I was building a resume, that would be a compelling reason, but I'd rather be drug across carpet tacks and dipped in rubbing alcohol than do web development for a living, so I don't care about that. All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. I'm not above giving up those two hours of sleep, but damned if I'll do it without a compelling reason. And the fact that Archer is a renowned C# guru and

                  C Offline
                  C Offline
                  Chris Maunder
                  wrote on last edited by
                  #21

                  There's a simple answer to that Chris. C# has the unsafe keyword. I think this suits you. cheers, Chris Maunder

                  L C 2 Replies Last reply
                  0
                  • C Christopher Duncan

                    Or so I'm sure it will seem to the faithful... I started in C back in the late 80s, moving to C++ when MSVC 1.0 came out. Never spent any significant time with VB (never installed it) because I was writing desktop applications and particularly in the early days, the advantages of C++ over VB were obvious. I like a language that doesn't say no. These days, I have to do a bit of web work here and there. Because the first shopping cart system I bought (before my current love affair with www.BvSoftware.com[^]) was based on classic ASP and VB script, that's what I got used to working with as I had to do significant code modifications to it. Compared to ASP.NET, classic ASP is a nightmare. So, I'm now moving towards ASP.NET in my web work. That of course raises the question of which language to use, VB or C#. The haughty, arrogant C++ coder in me scoffs at the thought of using VB. However, I'm somewhat familiar with it. C# requires extra time out of my life that I don't currently have to learn another language. But of course, C# is the new "cool" language. Here's my question. VB and C# are both managed languages talking to the same .NET runtime with the same restrictions. They strike me as nothing more than different colored wrapping paper around the same box. Why should I stop what I'm doing, give up the two hours I sleep each night and learn C#? What does it bring to the party beyond a familiar syntax that VB doesn't? Is there anything VB does that C# does better? Is there anything C# does that VB can't? Is there any real, functional reason to use one over the other? VB programmers take a lot of ribbing around here, and for desktop coding I might even join the fray. But I don't have any time to spare, and I'm not going to learn a new language just for the ego of saying I know the one that's currently trendy and popular. If I was building a resume, that would be a compelling reason, but I'd rather be drug across carpet tacks and dipped in rubbing alcohol than do web development for a living, so I don't care about that. All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. I'm not above giving up those two hours of sleep, but damned if I'll do it without a compelling reason. And the fact that Archer is a renowned C# guru and

                    D Offline
                    D Offline
                    Duncan Edwards Jones
                    wrote on last edited by
                    #22

                    To resolve this for yourself, open up one of the MS .NET documentation pages that has examples and turn the language filter off - then see which of the examples makes most sense to you and use that language. NB: If you are worried about VB.Net's legacy stuff just don't add the Microsoft.VisualBasic namespace. If you are worried about type safety use Option Strict. '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

                    1 Reply Last reply
                    0
                    • D Daniel Turini

                      Christopher Duncan wrote: All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. Ok, I'll bite it. 1. C# can create unsafe code. This means you have pointers, (almost) real pointers. This also means you can stackalloc memory, meaning much faster code. 2. C# resembles C++ syntax. IMHO, its much more beautiful. 3. C# is a type-safe language, VB.NET is not. [plug]VB.NET has some patological syntax ambiguities, which I digress about in my latest article[^], although the focus of the article is not this. [/plug] 4. C# have fine control over integer operation checking. 5. C# have the using statement for deterministic calling of Dispose(). If you don't know what it is, it means no handle leaks, if properly used. Only the mere existance of this statement can be the whole purpose of coding in C#. Without it, you'll need to resort to ugly try/finally in VB.NET. 6. C# generate doesn't generate nops on IL (VB needs it for setting "fake" breakpoints on statements that don't generate code). This means shorter IL. A 1Mb DLL in VB can be reduced to 900Kb in C#. 7. C# has the XML documentation feature. 8. C# can generate, right from the IDE, strong-named interop COM wrappers. With VB.NET, you'll need to resort to some ugly batch files with TLBIMP. 9. C# has "out" parameters. I love them. 10. Fine control of integer overflow checking with the "checked" and "unchecked" keyword. 11. The foreach statement on C# automatically calls Dispose on IDisposable enumerators. VB.NET don't. 12. C# has boolean short circuit. VB.NET has the ugliest sintax ever for this (AndAlso, OrElse). 13. C# has the :? operator. VB.NET has the ugly IIf, whith its collateral effects. 14. C# will have templates (aka generics) and other niceties on the next version. VB.NET will only be able to consume it, which says a lot about its future as a language. 15. Arrays in VB.NET are a nightmare. Redim should be ripped off. 16. Null, Nothing, Empty, "": the 4 constants of the apocalypse. 17. Me, MyBase, MyClass: the new 3 additions to the constants of the apocalypse. 18. Convoluted OOP syntax: a candy for those, without looking on MSDN who can tell me what's the difference between MustInherit and MustOverride. If you do,

                      C Offline
                      C Offline
                      Chris Maunder
                      wrote on last edited by
                      #23

                      This would make an excellent reference article, Daniel cheers, Chris Maunder

                      D C R 3 Replies Last reply
                      0
                      • C Chris Maunder

                        This would make an excellent reference article, Daniel cheers, Chris Maunder

                        D Offline
                        D Offline
                        Daniel Turini
                        wrote on last edited by
                        #24

                        Chris Maunder wrote: This would make an excellent reference article, Daniel I think you're right. I'll expand it and post ASAP. This is a very FAQ. Kant wrote: Actually she replied back to me "You shouldn't fix the bug. You should kill it"

                        1 Reply Last reply
                        0
                        • C Chris Maunder

                          There's a simple answer to that Chris. C# has the unsafe keyword. I think this suits you. cheers, Chris Maunder

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #25

                          That seem's like a sufficient solution for Christopher D. Although, no-one should be criticised for their choice of languages. Yeah, you get extra functionality with one language, you might have to do things slightly different in another language. It's just down to personal preference and constrictions on time, like whether you have enough time to learn something new. It all ends up as 1' and 0's anyway. Live to ride. Ride to live.

                          C 1 Reply Last reply
                          0
                          • D Daniel Turini

                            Christopher Duncan wrote: All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. Ok, I'll bite it. 1. C# can create unsafe code. This means you have pointers, (almost) real pointers. This also means you can stackalloc memory, meaning much faster code. 2. C# resembles C++ syntax. IMHO, its much more beautiful. 3. C# is a type-safe language, VB.NET is not. [plug]VB.NET has some patological syntax ambiguities, which I digress about in my latest article[^], although the focus of the article is not this. [/plug] 4. C# have fine control over integer operation checking. 5. C# have the using statement for deterministic calling of Dispose(). If you don't know what it is, it means no handle leaks, if properly used. Only the mere existance of this statement can be the whole purpose of coding in C#. Without it, you'll need to resort to ugly try/finally in VB.NET. 6. C# generate doesn't generate nops on IL (VB needs it for setting "fake" breakpoints on statements that don't generate code). This means shorter IL. A 1Mb DLL in VB can be reduced to 900Kb in C#. 7. C# has the XML documentation feature. 8. C# can generate, right from the IDE, strong-named interop COM wrappers. With VB.NET, you'll need to resort to some ugly batch files with TLBIMP. 9. C# has "out" parameters. I love them. 10. Fine control of integer overflow checking with the "checked" and "unchecked" keyword. 11. The foreach statement on C# automatically calls Dispose on IDisposable enumerators. VB.NET don't. 12. C# has boolean short circuit. VB.NET has the ugliest sintax ever for this (AndAlso, OrElse). 13. C# has the :? operator. VB.NET has the ugly IIf, whith its collateral effects. 14. C# will have templates (aka generics) and other niceties on the next version. VB.NET will only be able to consume it, which says a lot about its future as a language. 15. Arrays in VB.NET are a nightmare. Redim should be ripped off. 16. Null, Nothing, Empty, "": the 4 constants of the apocalypse. 17. Me, MyBase, MyClass: the new 3 additions to the constants of the apocalypse. 18. Convoluted OOP syntax: a candy for those, without looking on MSDN who can tell me what's the difference between MustInherit and MustOverride. If you do,

                            K Offline
                            K Offline
                            Kannan Kalyanaraman
                            wrote on last edited by
                            #26

                            Yeah you are right, just having the using statement should be reason enough to code in c#. Cool, never knew there where so many differences. Thanks Daniel :-) An article would be appropriate as you can more whenever you hear a quirk. Daniel Turini wrote: Shadows, Overloads, Overrides and Implements. X| Cheers, Kannan

                            1 Reply Last reply
                            0
                            • C Chris Maunder

                              There's a simple answer to that Chris. C# has the unsafe keyword. I think this suits you. cheers, Chris Maunder

                              C Offline
                              C Offline
                              Christopher Duncan
                              wrote on last edited by
                              #27

                              Chris Maunder wrote: C# has the unsafe keyword. I think this suits you. Man, wear a leather jacket and buy one little Corvette... :-) Chistopher Duncan Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)

                              D 1 Reply Last reply
                              0
                              • R Russell Morris

                                Christopher Duncan wrote: Here's my question. VB and C# are both managed languages talking to the same .NET runtime with the same restrictions. They strike me as nothing more than different colored wrapping paper around the same box. Strictly speaking, VB.NET is a bit more constraining as a programming language - you must manually declare overloaded functions with the Overload keyword, due to case insensitivity VB (I believe) cannot always consume CLR compliant code because the CLR is case sensitive, VB.NET's Integer is 16 bits instead of 32, etc... To use your analogy, C# is a very neatly wrapped package - there's just enough paper to cover the box, all edges are straight and neatly creased, and only two pieces of tape are used to keep everything together. VB.NET, however, is like a package covered in lots of little strips of leftover wrapping paper - it's messy, funny looking, there's almost as much tape as there is wrapping paper, and God help you if you ever actually need to get at what's inside the package. C# was built from the ground up as the high-level language to target the CLR - the other .NET-targetting languages have been hacked in. -- Russell Morris "Have you gone mad Frink? Put down that science pole!"

                                C Offline
                                C Offline
                                Christopher Duncan
                                wrote on last edited by
                                #28

                                Russell Morris wrote: VB.NET, however, is like a package covered in lots of little strips of leftover wrapping paper - it's messy, funny looking, there's almost as much tape as there is wrapping paper, and God help you if you ever actually need to get at what's inside the package. Yeah, it definitely gets the syntax vote on my part. Chistopher Duncan Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)

                                1 Reply Last reply
                                0
                                • C Chris Meech

                                  Christopher Duncan wrote: I've got years of dirt on the guy, and I know Krista's cell phone number Sounds like a juicy story for sure. Can't wait for the mud slinging to start. Sorry I don't have an answer for your question. But I do look forward to other responses. Hopefully they will be more tech oriented than marketing driven. Chris Meech "what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002. "Microsoft hasn't ever enforced its patents. Apparently they keep them for defensive reasons only. Or, they could be waiting 'til they have a critical mass of patents, enforce them all at once and win the game of Risk that they're playing with the world." Chris Sells Feb 18, 2003.

                                  C Offline
                                  C Offline
                                  Christopher Duncan
                                  wrote on last edited by
                                  #29

                                  Chris Meech wrote: Sounds like a juicy story for sure. Yeah, but I've gotta save them for when I can get some mileage out of them. :-D Chistopher Duncan Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)

                                  1 Reply Last reply
                                  0
                                  • D Daniel Turini

                                    Christopher Duncan wrote: All you arrogant C++ bitheads (i.e., my brothers and sisters in arms) who constantly rag on the VB guys, step on up to the plate and tell me why, in practical terms, C# is more powerful than VB for .NET web apps. Ok, I'll bite it. 1. C# can create unsafe code. This means you have pointers, (almost) real pointers. This also means you can stackalloc memory, meaning much faster code. 2. C# resembles C++ syntax. IMHO, its much more beautiful. 3. C# is a type-safe language, VB.NET is not. [plug]VB.NET has some patological syntax ambiguities, which I digress about in my latest article[^], although the focus of the article is not this. [/plug] 4. C# have fine control over integer operation checking. 5. C# have the using statement for deterministic calling of Dispose(). If you don't know what it is, it means no handle leaks, if properly used. Only the mere existance of this statement can be the whole purpose of coding in C#. Without it, you'll need to resort to ugly try/finally in VB.NET. 6. C# generate doesn't generate nops on IL (VB needs it for setting "fake" breakpoints on statements that don't generate code). This means shorter IL. A 1Mb DLL in VB can be reduced to 900Kb in C#. 7. C# has the XML documentation feature. 8. C# can generate, right from the IDE, strong-named interop COM wrappers. With VB.NET, you'll need to resort to some ugly batch files with TLBIMP. 9. C# has "out" parameters. I love them. 10. Fine control of integer overflow checking with the "checked" and "unchecked" keyword. 11. The foreach statement on C# automatically calls Dispose on IDisposable enumerators. VB.NET don't. 12. C# has boolean short circuit. VB.NET has the ugliest sintax ever for this (AndAlso, OrElse). 13. C# has the :? operator. VB.NET has the ugly IIf, whith its collateral effects. 14. C# will have templates (aka generics) and other niceties on the next version. VB.NET will only be able to consume it, which says a lot about its future as a language. 15. Arrays in VB.NET are a nightmare. Redim should be ripped off. 16. Null, Nothing, Empty, "": the 4 constants of the apocalypse. 17. Me, MyBase, MyClass: the new 3 additions to the constants of the apocalypse. 18. Convoluted OOP syntax: a candy for those, without looking on MSDN who can tell me what's the difference between MustInherit and MustOverride. If you do,

                                    D Offline
                                    D Offline
                                    David Stone
                                    wrote on last edited by
                                    #30

                                    This is brilliant Daniel! More reasons than I could ever come up with. I'll definitely be showing this to some friends who are staunch VB.NET supporters. :)


                                    Hawaian shirts and shorts work too in Summer. People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage... -Anna-Jayne Metcalfe on Paintballing

                                    D 1 Reply Last reply
                                    0
                                    • N Nitron

                                      Just do everything in Flash! ;P (kidding, i promise, i'm kidding!) - Nitron


                                      "Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb

                                      C Offline
                                      C Offline
                                      Christopher Duncan
                                      wrote on last edited by
                                      #31

                                      Nitron wrote: Just do everything in Flash! Yikes! Are you kidding? After how grumpy Paul was yesterday??? Chistopher Duncan Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)

                                      1 Reply Last reply
                                      0
                                      • D David Chamberlain

                                        [start sarcasm/reality] You can rationalize it all you want, and you can spend countless hours trying to justify your decisions to yourself only so that you aren't so scared when you have to try to justify them to someone else. But, the bottom line is that you are a professional who is trying to get a job done, and as such, you must use the tools you have in your toolbox. They may not be the best tools, but they are all you've got, so your job is to use what you have to the best of your ability to reach the end result. You know that. You've written about it. And when you do end up using VB, don't admit it in public and don't talk too much about it around here. [end sarcasm] Dave "You can say that again." -- Dept. of Redundancy Dept.

                                        C Offline
                                        C Offline
                                        Christopher Duncan
                                        wrote on last edited by
                                        #32

                                        David Chamberlain wrote: so that you aren't so scared when you have to try to justify them to someone else. Not me - I'm fearless! One of the few benefits of ignorance... :-) Chistopher Duncan Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)

                                        1 Reply Last reply
                                        0
                                        • C Christopher Duncan

                                          Chris Maunder wrote: C# has the unsafe keyword. I think this suits you. Man, wear a leather jacket and buy one little Corvette... :-) Chistopher Duncan Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)

                                          D Offline
                                          D Offline
                                          David Stone
                                          wrote on last edited by
                                          #33

                                          Christopher Duncan wrote: Man, wear a leather jacket and buy one little Corvette... :laugh: That was not a "little" 'Vette. ;P


                                          Hawaian shirts and shorts work too in Summer. People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage... -Anna-Jayne Metcalfe on Paintballing

                                          C 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups