Click here to Skip to main content
15,900,589 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Dumb VB fact of the Day Pin
atverweij9-Nov-18 0:42
atverweij9-Nov-18 0:42 
GeneralRe: Dumb VB fact of the Day Pin
#realJSOP9-Nov-18 0:55
professional#realJSOP9-Nov-18 0:55 
GeneralRe: Dumb VB fact of the Day Pin
atverweij9-Nov-18 1:01
atverweij9-Nov-18 1:01 
GeneralRe: Dumb VB fact of the Day Pin
atverweij9-Nov-18 2:09
atverweij9-Nov-18 2:09 
GeneralRe: Dumb VB fact of the Day Pin
#realJSOP9-Nov-18 0:54
professional#realJSOP9-Nov-18 0:54 
GeneralRe: Dumb VB fact of the Day Pin
atverweij9-Nov-18 1:26
atverweij9-Nov-18 1:26 
GeneralRe: Dumb VB fact of the Day Pin
kalberts9-Nov-18 2:42
kalberts9-Nov-18 2:42 
GeneralRe: Dumb VB fact of the Day Pin
ZevSpitz12-Nov-18 5:09
professionalZevSpitz12-Nov-18 5:09 
John Simmons / outlaw programmer wrote:
Because the name starts with "VB".


Because you don't like the name? It seems to me your dislike is far to strong to be justified by this.

John Simmons / outlaw programmer wrote:
The words "virtually" and "almost" should be indicators for you...


I was referring specifically to pattern matching and types that make use of Span<T>, which are both relatively new features in C# and .NET in general. Unsafe code is also something that C# has which VB.NET doesn't.

IMO, pattern matching is as much a game-changer as LINQ, in writing expressive code, and it is quite unfortunate that it is not yet in VB.NET.

But I think the others are relatively edge cases. Your average business developer, targeting a Web stack or desktop application, doesn't need the higher performance of Span<T>, or unsafe programming -- not in C# and not in VB.NET.

Are you aware of other differences in day-to-day usage? Please feel free to correct me.

John Simmons / outlaw programmer wrote:
"Inferring" and being typeless do not make VB a better idea.


I think that inferring the type in general is a good idea (using `var` in C# or `auto` in C++), because the code becomes more declarative -- focused on the intent of the code, and less focused on the mechanism the code will use. It's true that when every byte matters, it may be important to specify the type as byte, but again, I think these are relatively edge cases.

But I didn't say I think these are good things; only that these are things that work in VB.NET and will not work when transferring this knowledge over to C#.

(In fact, inferring delegate types from lambda expressions might involve a serious performance hit. If I have a database with a million records, and I use an ORM to extract the records which match a certain condition:

VB
Dim qry As IQueryable(Of Person)

'fill qry

Dim filter = Function(x As Person) x.LastName.StartsWith("A")
Dim results = qry.Where(filter)


this code will use the Enumerable.Where extension method (which takes a delegate instance and not an expression), retrieve all the records in the database, and filter them in memory in the application code, all without any error. C# will not allow this, and force you to explicitly type filter as Expression<Func<Person, bool>>.

The automatic conversion that VB.NET does from a numeric string to an integer is also a bad idea, because the conversion might sometimes work in odd ways, and can be exceedingly hard to debug.)


John Simmons / outlaw programmer wrote:
typeless


Note that VB.NET is not typeless, it just treats the type Object like C#'s dynamic.

modified 12-Nov-18 11:31am.

GeneralRe: Dumb VB fact of the Day Pin
Richard Deeming9-Nov-18 1:25
mveRichard Deeming9-Nov-18 1:25 
GeneralRe: Dumb VB fact of the Day Pin
atverweij9-Nov-18 1:33
atverweij9-Nov-18 1:33 
GeneralRe: Dumb VB fact of the Day Pin
kalberts9-Nov-18 3:58
kalberts9-Nov-18 3:58 
GeneralRe: Dumb VB fact of the Day Pin
atverweij9-Nov-18 4:32
atverweij9-Nov-18 4:32 
GeneralRe: Dumb VB fact of the Day Pin
#realJSOP9-Nov-18 1:39
professional#realJSOP9-Nov-18 1:39 
GeneralRe: Dumb VB fact of the Day Pin
atverweij9-Nov-18 1:45
atverweij9-Nov-18 1:45 
GeneralRe: Dumb VB fact of the Day Pin
#realJSOP9-Nov-18 1:52
professional#realJSOP9-Nov-18 1:52 
GeneralRe: Dumb VB fact of the Day Pin
atverweij9-Nov-18 1:56
atverweij9-Nov-18 1:56 
GeneralRe: Dumb VB fact of the Day Pin
Tokinabo9-Nov-18 3:00
professionalTokinabo9-Nov-18 3:00 
GeneralRe: Dumb VB fact of the Day Pin
obermd9-Nov-18 3:01
obermd9-Nov-18 3:01 
GeneralRe: Dumb VB fact of the Day Pin
CP7779-Nov-18 3:43
CP7779-Nov-18 3:43 
GeneralRe: Dumb VB fact of the Day Pin
Slow Eddie9-Nov-18 3:13
professionalSlow Eddie9-Nov-18 3:13 
GeneralRe: Dumb VB fact of the Day Pin
#realJSOP9-Nov-18 3:47
professional#realJSOP9-Nov-18 3:47 
GeneralRe: Dumb VB fact of the Day Pin
Slow Eddie9-Nov-18 7:33
professionalSlow Eddie9-Nov-18 7:33 
GeneralRe: Dumb VB fact of the Day Pin
Matt McGuire9-Nov-18 4:35
professionalMatt McGuire9-Nov-18 4:35 
GeneralRe: Dumb VB fact of the Day Pin
#realJSOP9-Nov-18 4:59
professional#realJSOP9-Nov-18 4:59 
GeneralRe: Dumb VB fact of the Day Pin
Matt McGuire9-Nov-18 6:17
professionalMatt McGuire9-Nov-18 6:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   491 votes