|
Kornfeld Eliyahu Peter wrote: From your post I can conclude you are not in the same boat my manager... FTFY
Kornfeld Eliyahu Peter wrote: you will understand how VB is limited It's pretty much the same as C# though.
Although lately it hasn't been given the same attention as C#.
It works the same for .NET, but I don't even think .NET Core supports VB.
As far as I'm concerned that's Microsoft telling us VB is still supported, but not further developed.
Anyway, that's not really the language's fault...
|
|
|
|
|
|
Ok, so VB is or wasn't supported for .NET Core 1.x, Portable Framework, Unity, some Azure functionality...
It seems VB always comes last for Microsoft, if at all.
And then sometimes, someone, like you, comes along who loves VB and promises to make it all better and it gets a little bit better only for VB to fall behind again.
Yeah, VB was my first language and as such it has a special place in my heart, but I wouldn't recommend VB as a career path for anyone.
Programmers aren't using it, employers aren't asking for it.
It only, somehow, has a high position in a weird TIOBE index.
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: ...you will understand how VB is limited...
You assertion is a lie.
C# and VB.NET are equivalent languages!!
See:
VB.NET and C# Comparison (2016)[^]
Sorry to use large fonts, but I guess you did not read it the first time
|
|
|
|
|
Lexical part of the language is not all makes it a language...
Try this in English:
Tavon a lúd átúsz, visszaúsz meg átúsz.
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
Please, see this hypothetical and valid VB.NET code:
Select Case L1
Case Is < 50
If L1 = 42 Then
For x = 0 To 100
For y = 0 To 100
For z = 0 To 100
L1 = DoSomethingWithL(x,y,z,L)
If L1 = 2 Then L1 += 1 Else L1 = 0
Next z
Next y
Next x
End If
Case Is > 390
L1 = 0
Case Is = 70
L1 = 32
End Select
Now compare with the only way to do the same thing in C#:
if (L1 < 50)
{
if (L1 == 42)
{
for (var x = 0; x <= 100; x++)
{
for (var y = 0; y <= 100; y++)
{
for (var z = 0; z <= 100; z++)
{
L1 = DoSomethingWithL(x,y,z,L);
if (L1 == 2)
{
L1 += 1;
}
else
{
L1 = 0;
}
}
}
}
}
}
else if (L1 > 390)
{
L1 = 0;
}
else if (L1 == 70)
{
L1 = 32;
}
Which is more readable and fun? Do you prefer "Curly Braces Hell"?
modified 14-Oct-18 14:08pm.
|
|
|
|
|
I would say that such highly hypothetical code has nothing to do with nothing...
I also would say that you do not know how to write efficient code in C#, if you think you have to add all those brackets, or that this is the only way to write it...
You also totally drop the factor of experience... C# can be done in different ways, and be still perfectly readable for the experienced...
(L1 = (L1 == 42 || (L1 > 390)) ? L1 = 0 : (L1 == 70) ? L1 = 32 : L1;)
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: I would say that such highly hypothetical code has nothing to do with nothing...
Yes, it is an highly hypothetical and compilable code and randomly typed in Visual Studio. I did it just to show my point.
Kornfeld Eliyahu Peter wrote: (L1 = (L1 == 42 || (L1 > 390)) ? L1 = 0 : (L1 == 70) ? L1 = 32 : L1;)
This C# code you made is not similar to that one, I have edit it and added only one line inside "for" block:
DoSomethingWithL(x,y,z,L);
Please, try again with this new code.
|
|
|
|
|
It appears with the garbage VB and supposedly identical C# you concocted that you are a master of master of all things! We should bow to you and our soon-to-be VB.NET overlords!
Oh, but wait, what's this? Surely this doesn't work?! You can't have expressions in a C# switch statement!!!
Sorry, but YES YOU CAN, if you know even 1% of C# BASIC syntax...
switch (L1)
{
case int xx when xx < 50 || xx == 42:
for (int x = 0; x < 101; x++)
for (int y = 0; y < 101; y++)
for (int z = 0; y < 101; z++)
{
L1 = DoSomethingWithL(x, y, z, L1);
L1 = (L1 == 2 ? L1 = 3 : L1 = 0);
}
break;
case int xx when xx > 390:
L1 = 0;
break;
case 70:
L1 = 32;
break;
}
If you love VB.NET, then USE it, we don't care. Just stop embarrassing yourself by trying to "Prove" how much better VB.NET is.
I am proficient in both languages and I prefer C#. That doesn't make me better or worse than you.
All you do with these threads on "VB is better!!!" is tick people off. If that's how you get your jollies, I feel for you.
'nuff said.
Sincerely,
-Mark
mamiller@rhsnet.org
|
|
|
|
|
Mark Miller wrote: Sorry, but YES YOU CAN, if you know even 1% of C# BASIC syntax
This C# code you made is valid only in Visual Studio 2017 and C# 7.0, few people know that
But the equivalent VB.net is so since 2002
So you have made a stupid and impolite declaration about my C# knowledge
Pattern Matching in C# 7.0 Case Blocks -- Visual Studio Magazine[^]
|
|
|
|
|
Your reply proves my point, so thank you for responding EXACTLY the way I knew you would.
I'll not bother replying again, so rant away! Very few are listening.
Sincerely,
-Mark
mamiller@rhsnet.org
|
|
|
|
|
Mark Miller wrote: Very few are listening.
Sincerely,
-Mark
OK, anyway you are breaking this site rules beeing so impolite, this an evidence of possible disguise of lack of knowledge about what you are saying.
|
|
|
|
|
Not very readable though is it?
modified 6-Sep-22 21:01pm.
|
|
|
|
|
Depends on who reading... I have no problem to see what happening there... even easier than reading the if/else version...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
Exactly. The experienced may be able to understand it; me, as a hobby coder, finds it a lot harder to read and understand what is going on 😀
modified 6-Sep-22 21:01pm.
|
|
|
|
|
1000x times yes. Oh goodness, I'm spending lines, LINES on syntax that explicitly marks the beginning and end of each statement. OH NO, STOP THE PRESSSES, CANCEL C#, READABILITY IS OVERRATED, all bow to the mighty "more lines on screen = good" crowd.
|
|
|
|
|
They are equivalent in the sense that they both target the .NET Framework.
They are NOT statement-for-statement equivalent. Read Comparison of C Sharp and Visual Basic .NET - Wikipedia[^]
There are features of both languages that you cannot use or find an equivalent for in the other.
|
|
|
|
|
Dave Kreskowiak wrote: They are equivalent in the sense that they both target the .NET Framework.
Not only this, They are equivalent in the sense that they both can do the same things with equivalent (almost) amount of code (amount of lines).
|
|
|
|
|
That is most assuredly not true. You would know this if you bothered to read the link I gave you.
Again, when are you going to learn to read without bias?
|
|
|
|
|
|
|
Which has NOTHING to do with C# and VB.NET being developed separately and your comparison of the two being "equivalent".
|
|
|
|
|
Equivalent, huh?
OK, give the me the VB.NET equivalent of C#'s "checked" and "unchecked" keywords.
|
|
|
|
|
That is true only because MS deemed it so. They have less support for VB, the business language that built MS. It is a quality language as is c# only with out the } and is intelligent enough to know when the statement ends unlike is single letter counterpart.
|
|
|
|
|
So what made MS "deem it so"?
As for "smart enough", I'd rather code to the explicit rather than the convention.
|
|
|
|