<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>What I love about VB.NET.</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx</link><description>Via, Yag , Paul , and Jay , Scott touched on some of the nice things VB.NET has to offer. So I thought I&amp;#8217;d add to that list the things I love. Some of these are what I see as improvements over VB6, some as advancements compared to C#.... - Block</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Implied Interfaces</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#1577877</link><pubDate>Tue, 08 Apr 2008 05:34:04 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1577877</guid><dc:creator>@ Head</dc:creator><description>&lt;p&gt;One of the many things I love about VB is it&amp;amp;#39;s explicit interface mapping . It&amp;amp;#39;s the beauty of&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1577877" width="1" height="1"&gt;</description></item><item><title>re: What I love about VB.NET.</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#64654</link><pubDate>Wed, 31 Aug 2005 09:19:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:64654</guid><dc:creator>bill</dc:creator><description>vb is nice don't get me wrong.  i'm a firm believer in using the right tool for the right job.  vb is nice because so many people know how to use it (even though many people don't take advantage of it's full potential).&lt;br&gt;&lt;br&gt;with that said, i must agree with the above comment, c# is MUCH easier to read than VB.  the reason is because c# &amp;quot;usually&amp;quot; uses symbols rather than words, leaving the words to things like variables and function names.&lt;br&gt;&lt;br&gt;when i look at a page of vb code, it looks more like a dictionary with words scattered all over the page.  i'm sure the code was easy to write, but when a developer who didn't write the code has to come along later and debug it, it can really be a pain in the arse.  i would much rather debug a c# application as i can almost instantly see what the programmer was trying to do without having to siff through a bunch of words.&lt;br&gt;&lt;br&gt;finally, the biggest advantage c# will always have over vb is that it's almost identical to the languages of java, java script, and c.  if you master 1 you will be well rehearsed in the other languages.  if programing languages were instruments, the language syntax of c would be the piano.&lt;br&gt;&lt;br&gt;again, vb has it's place too and we use it all the time.  but when it comes to programing low level or internet intensive application, i always use c# and for good reason.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=64654" width="1" height="1"&gt;</description></item><item><title>re: What I love about VB.NET.</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#40842</link><pubDate>Tue, 05 Apr 2005 01:47:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:40842</guid><dc:creator>bill</dc:creator><description>Good One&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=40842" width="1" height="1"&gt;</description></item><item><title>re: What I love about VB.NET.</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#37157</link><pubDate>Mon, 28 Feb 2005 15:40:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:37157</guid><dc:creator>bill</dc:creator><description>hey Dan,&lt;br&gt;&lt;br&gt;On readability:  yes on both counts &lt;a title="winking smiley" href="#" &gt;&lt;img src="http://billmccarthy.mvps.org/smileys/bw/wink.gif" border="0"&gt;&lt;/a&gt;  VB.NET is indeed the more natural language.  As to it's verbosity, well that is coded telling you things, rather than being reliant on added in comments, the code itself is explanatory. (which also brings with it conformitiy) It's all part and parcel of declerative programming.&lt;br&gt;&lt;br&gt;that being said, I do think at a shallow level, C# code has a lot more whitespace in it, which visually, for some folks can make it easier to scan.  I think for Vb.NET, improvements in the IDE can make a significant change there. &lt;br&gt;&lt;br&gt;But as to your difficulty in parsing VB.NET code, well as you said, VB.NET is actually more natural.  It is probably more that you need practice reading and writing the code. Your mind will soon pick up on keywords and skip similarly to how you do in C#.  For example, you won't focus on the Dim keyword, rather just mentally note the declaration is there and when looking at it you will focus on the variable name and the type.  So on the visual side of things, that really is a matter of experience.&lt;br&gt;&lt;br&gt;As to events in Vb.NET, I'm sorry but there is no &amp;quot;inadvertant GC rooting&amp;quot;.  I don't know who told you that, but you/they were sorely mislead.&lt;br&gt;On serialization, Vb.NET has absolutely no problems with XML serialization.  There is however an issue with binary serialization and MarshalByRef classes.  The real problem is MarhsalByRef classes, eg a Windows.Form, cannot be binary serialized.  If you need to work around that, you can do so in Vb.NET 2005, and more elegantly than C# &lt;a title="winking smiley" href="#" &gt;&lt;img src="http://billmccarthy.mvps.org/smileys/bw/wink.gif" border="0"&gt;&lt;/a&gt;&lt;br&gt;As to async event raising, I'm sorry but once again you have been sorely misled, but that is also a common misunderstanding.  I remember sometime ago Juval Lowey wrote me saying you couldn't raise events in VB.NET asyncronously. I wrote back and told him you could, but it took a couple of emails and the code before he was convinced.  Then happily a couple of months later he told me that you could raise events asyncronously in Vb.NET &amp;lt;bg&amp;gt;  Anwyay, so the experts are all in on this, and indeed you can *easily* raise events asyncronously in VB.NET, and have been able to since day one.&lt;br&gt;&lt;br&gt;So when we look at what you claim to be a leaky abstraction, you are basing that purely on not being able to binary serialize events if any handler is MarshalByRef.  That is not the fault of the abstraction.  In fact if you look at the VB.NET 2005 implementation you can keep the abstraction AND also customise the storage and raise method in an encapsualted design that uses the full CLR spec, something which C# still doesn't do.  &lt;br&gt;&lt;br&gt;I will follow this up later this week with a couple of posts on Events and Event handlingn in Vb.NET.  Seems there may still be some folks who need to learn the facts there &lt;a title="winking smiley" href="#" &gt;&lt;img src="http://billmccarthy.mvps.org/smileys/bw/wink.gif" border="0"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=37157" width="1" height="1"&gt;</description></item><item><title>No True Object Programmer, Part Deux</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#37190</link><pubDate>Mon, 28 Feb 2005 11:31:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:37190</guid><dc:creator>TrackBack</dc:creator><description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=37190" width="1" height="1"&gt;</description></item><item><title>re: What I love about VB.NET.</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#37143</link><pubDate>Mon, 28 Feb 2005 11:10:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:37143</guid><dc:creator>bill</dc:creator><description>On readability, what I'm saying is that I can more quickly look at C#/Java/whatever and understand it. Obviously &amp;quot;end&amp;quot; is more natural than &amp;quot;closing brace thingy,&amp;quot; but I'm not saying the words in my head. My brain just parses it. VB is slower for me because of its verbosity. If I needed to read the code aloud to someone else, sure, &amp;quot;End XXX&amp;quot; is better.&lt;br&gt;&lt;br&gt;On event handling, I can understand your argument. But I consider event handling in VB to be a very leaky abstraction (as Joel on Software would say). Serialization issues, inadvertent GC rooting, et al come into play here and it all comes crashing down.&lt;br&gt;&lt;br&gt;The issue, I think, is that VB (currently) has the abstraction in lieu of the &amp;quot;nuts and bolts&amp;quot; pieces that you need to get event handling to work, 100% of the time, in every context. The &amp;quot;RaiseEvent&amp;quot; keyword doesn't do me any good if, for instance, I want to raise the event asynchronously. This is elegant in C# because the underlying implementation is accessible. &lt;br&gt;&lt;br&gt;So in conclusion, I think OO abstractions are great. But we need the fundamentals there first.&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=37143" width="1" height="1"&gt;</description></item><item><title>No True Object Programmer, Part Deux</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#37161</link><pubDate>Mon, 28 Feb 2005 00:32:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:37161</guid><dc:creator>TrackBack</dc:creator><description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=37161" width="1" height="1"&gt;</description></item><item><title>re: What I love about VB.NET.</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#37103</link><pubDate>Sun, 27 Feb 2005 16:57:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:37103</guid><dc:creator>bill</dc:creator><description>Hi Dan,&lt;br&gt;&lt;br&gt;Actually on the End XXX constructs, I said that pretty badly &lt;a title="winking smiley" href="#" &gt;&lt;img src="http://billmccarthy.mvps.org/smileys/bw/wink.gif" border="0"&gt;&lt;/a&gt;  What I meant to say is they are more readable, but they do also more closely mimic the spoken language.  Try this yourself at home, write a couple of blocks of C# code then try to read the code out aloud including all block and flow constructs. Presume the person listening to you cannot see the code.  When you do that, you will or should find yourself uttering &amp;quot;end if&amp;quot; for your }'s that indicate the end of an if block etc.&lt;br&gt;&lt;br&gt;As to VB.NET being more OO, well interfaces, event handlers, are all implemented in mroe OO fashions.  I'll blog about these separately as I think a lot of people haven't yet seen the forest for the trees on these issues.  Think polymorphism, think encapsulation, then look at how the two languages compare.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;\&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=37103" width="1" height="1"&gt;</description></item><item><title>re: What I love about VB.NET.</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#37102</link><pubDate>Sun, 27 Feb 2005 16:25:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:37102</guid><dc:creator>bill</dc:creator><description>In my blog post, I completely misunderstood what you were tryingn to say with &amp;quot;End XXX,&amp;quot; apologies. Although, it's probably obvious that I don't agree. I'd like to hear examples of your thoughts on how VB is more object-friendly.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=37102" width="1" height="1"&gt;</description></item><item><title>re: What I love about VB.NET.</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#37012</link><pubDate>Sat, 26 Feb 2005 20:25:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:37012</guid><dc:creator>bill</dc:creator><description>Hi Geoff,&lt;br&gt;&lt;br&gt;Yeh I wanted TryCast way back in the beta's of 2002, but more for performance issues than anything else.  If you use TryCast, you then have to test for null, as opposed to testing the TypeOf the object before doing a DirectCast, well there isn't really much difference in coding style, rather the difference is in the under pinnings.&lt;br&gt;&lt;br&gt;Personally, as much as I like TryCast, especially as it does make it easier to port C# code to VB.NET, I would have preferred the effort went into recognizing and optimizing the If TypeOf foo is bar Then .... x = CType(foo, bar).&lt;br&gt;&lt;br&gt;Or basically what I am saying is that a high level language should not force us to use different constructs for optimisation where it is posible for the compiler to do it for us &lt;a title="" href="#" &gt;&lt;img src="http://billmccarthy.mvps.org/smileys/bw/smiley.gif" border="0" alt="smile"&gt;&lt;/a&gt;  An example is ForEach with arrays.&lt;br&gt;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=37012" width="1" height="1"&gt;</description></item><item><title>re: What I love about VB.NET.</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#37011</link><pubDate>Sat, 26 Feb 2005 20:15:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:37011</guid><dc:creator>bill</dc:creator><description>&amp;gt;- Explicit casting.  CType or DirectCast, such as CType(myfoo, IBar).DoIt&lt;br&gt;&lt;br&gt;Of all the things that whidbey is giving us, do you know what i'm most impatient for?&lt;br&gt;&lt;br&gt;TryCast.&lt;br&gt;&lt;br&gt;&lt;a title="" href="#" &gt;&lt;img src="http://billmccarthy.mvps.org/smileys/bw/smiley.gif" border="0" alt="smile"&gt;&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=37011" width="1" height="1"&gt;</description></item><item><title>No True Object Programmer</title><link>http://msmvps.com/blogs/bill/archive/2005/02/26/37009.aspx#37092</link><pubDate>Sat, 26 Feb 2005 19:18:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:37092</guid><dc:creator>TrackBack</dc:creator><description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=37092" width="1" height="1"&gt;</description></item></channel></rss>