-
Nov 11th, 2022, 05:37 AM
#1
Thread Starter
Frenzied Member
Change the source code of the .Net4.8 framework from C# to VB.NET
Lately, I've been reading the source code for .NET4.8 core libs (mscorelib.dll and system.dll, system.core.dll), which are written in C#. For a long-time user of VB6, it is much easier to read VB.NET code than C# code. If there is a version of .NET4.8 core libs developed with VB.NET, it can greatly reduce the time VB6ers spend reading the source code. So, I'm wondering if anyone has replaced C# with VB.NET and successfully compiled the .NET 4.8 core libs. Thanks!
-
Nov 11th, 2022, 05:42 AM
#2
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
I can't imagine anyone willing to waste their time doing that. I suggest that you install Instant VB and, unless you want to pay for the full version, convert the code one method at a time as you need it.
-
Nov 11th, 2022, 06:22 AM
#3
Thread Starter
Frenzied Member
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
Originally Posted by jmcilhinney
I can't imagine anyone willing to waste their time doing that. I suggest that you install Instant VB and, unless you want to pay for the full version, convert the code one method at a time as you need it.
I know there's little chance of finding my answer, but sometimes I still hope for a miracle.
Also, I've used Instant VB and it's great. But, obviously, it can't translate some complex C# code into VB.NET, much less the entire mscorelib project into VB.NET
-
Nov 11th, 2022, 06:40 AM
#4
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
You could always try something like https://github.com/dnSpyEx to reverse engineer the compiled assemblies into vb.net, no idea how useful the reverse engineered code would be without comments etc.
-
Nov 11th, 2022, 07:19 AM
#5
Thread Starter
Frenzied Member
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
Originally Posted by PlausiblyDamp
You could always try something like https://github.com/dnSpyEx to reverse engineer the compiled assemblies into vb.net, no idea how useful the reverse engineered code would be without comments etc.
Very valuable information, I'll take the time to give dnSpyEx a try. Thank you very much, PlausiblyDamp.
-
Nov 11th, 2022, 11:12 AM
#6
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
Originally Posted by SearchingDataOnly
So, I'm wondering if anyone has replaced C# with VB.NET and successfully compiled the .NET 4.8 core libs. Thanks!
Nobody is going to do that, and if somebody does, you should RUN!!! Since they'd clearly be insane.
Just think of the potential issues that would create. You start with code that is working and well tested, and then what? If you pass it all through a converter, then what you end up with is code that probably converted fairly well, unless the converter is buggy. It's a HUGE amount of code, potentially, so you've gone from working and well tested code to a conversion of that, which you hope is a good conversion, and which you can't then test as thoroughly as the original code. The best you can say about that is that converting from C# to VB.NET is a relatively simple and well understood operation, so it is quite likely that the conversion was reliable.
At that point, you have a snapshot of the code at the time when you did the conversion. If a patch were to update something...well, would you even know?
So, while it might not take unreasonably amount of time to do that conversion, there are two potential issues with doing that, and the only benefit is so that you don't have to read C#. Does that benefit outweigh the potential costs? Probably not. After all, if you found the converted code, are you certain it's a conversion of the latest patched version, or are you looking at code that might be subtly different from what is actually being run?
My usual boring signature: Nothing
-
Nov 12th, 2022, 02:04 AM
#7
Thread Starter
Frenzied Member
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
What you said makes sense. But what you overlook is that .NET4.8 development is frozen, so its code is relatively stable (no major changes). In addition, VB.NET can't translate C# code 100% accurately, which in itself shows that .NET's technical route to bundle multiple languages together is wrong.
-
Nov 12th, 2022, 02:27 AM
#8
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
Originally Posted by SearchingDataOnly
which in itself shows that .NET's technical route to bundle multiple languages together is wrong.
It shows no such thing.
-
Nov 12th, 2022, 11:45 AM
#9
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
Yeah, I'm not sure how you get there. They are very similar, but not identical. However, VS has long had several different languages, so those get bundled. Also, since both C# and VB produce .NET IL, they are quite compatible. When you are creating IL, which only then gets turned into machine language, it really doesn't matter which language you write the original code in. As long as there is some compiler that turns the source into .NET IL, the syntax of the source could be C#, VB, C, Python, Java, Rockstar, or anything else. Sure, they won't all be able to create ALL possible IL, but every one of them could be turned into IL, and the IL will then be turned into machine language using the same compiler. How you get to the IL will have it's quirks. How you go from IL to machine language will all be the same.
At that point, why NOT bundle them all together? The goal is the IL, the languages are just different starting points of different paths that lead to that goal. There isn't any good reason to put them in different IDEs. What possible good would that do?
My usual boring signature: Nothing
-
Nov 13th, 2022, 10:49 PM
#10
Thread Starter
Frenzied Member
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
The relationship between VB.NET and C# is different from that of other languages. VB.NET and C# belong to two expressions of the same language, and when C# cannot be converted to VB.NET with 100% accuracy, it shows that Microsoft's original strategy was a failure. It's like the U.S. Air Force piled all its features on the F35, and now the situation proves that this is an extremely bad design.
Last edited by SearchingDataOnly; Nov 13th, 2022 at 11:21 PM.
-
Nov 13th, 2022, 11:26 PM
#11
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
Originally Posted by SearchingDataOnly
The relationship between VB.NET and C# is different from that of other languages. VB.NET and C# belong to two expressions of the same language
That is an utter crock. VB.NET is based on a long history of BASIC and Visual Basic, while C# is based on a long history of C/C++ and Java. They are two distinct language families. If you want to claim that they are somehow the same language because they both get compiled to CIL then you have to also accept that C++/CLR and F# are also the same language. There was even a version of Delphi that compiled to CIL too, so that must also be the same language. Nonsense, of course. You're just making things up to fit a narrative. There are arguments to be made against the .NET platform but this isn't one of them.
-
Nov 14th, 2022, 05:49 AM
#12
Thread Starter
Frenzied Member
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
Originally Posted by jmcilhinney
VB.NET is based on a long history of BASIC and Visual Basic
Obviously, you know very little about VB.NET and Visual Basic. VB.NET and C# are like brothers. VB.NET and VisualBasic are like children with the same name, but from two completely different families, they are not even cousins, but the same name.
Last edited by SearchingDataOnly; Nov 14th, 2022 at 06:16 AM.
-
Nov 14th, 2022, 01:09 PM
#13
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
the two languages, at the beginning, were basically identical, in that they all had equivalent functions, methods, variables to each other. This is why the online converters were able to swap back and forth. However, that was merely at the beginning. They have completely different dev teams and there are now many differences that simply don't translate between them anymore. You would have to rewrite many functions from scratch.
As for them "being the same language", looking at the linking file and claiming they are the same is about as accurate as saying vb6 and c++ were the same language since they both used the same compiler and linker in visual studio. They ALL end up as machine code so they are all the same right?
-
Nov 14th, 2022, 06:04 PM
#14
Re: Change the source code of the .Net4.8 framework from C# to VB.NET
Originally Posted by SearchingDataOnly
Obviously, you know very little about VB.NET and Visual Basic. VB.NET and C# are like brothers. VB.NET and VisualBasic are like children with the same name, but from two completely different families, they are not even cousins, but the same name.
I mostly agree with Sir Orwell, except that they started somewhat different, converged by 2010, then started diverging again.
Still, they are not nearly so similar. The groups within MS were quite separate. The intention was that there could be a variety of different languages that all ended up with IL. The intention was also that there would be a variety of compilers that took the IL and created code that ran on different platforms, because .NET was intended as a competitor to the 'write once run everywhere' promise that Java had back in the late 90s. What actually happened was different from that, but we can't be using hindsight, we need to see it from the point of view of the time when it was created.
I've heard stories of that creation at family gatherings from one of the people who called some of the meetings and headed up at least a portion of one of the projects. There was a whole lot more guessing and a whole lot less certainty, at the time, than the narrative that people tell these days.
My usual boring signature: Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|