Click to See Complete Forum and Search --> : Visual Studio Questions
Joseph Witchard
09-07-2008, 10:51 PM
I was able to go to college for one semester, and while I was there I took the beginners Visual Basic course. I know a lot of people around here very much dislike Microsoft (when the only branch I really hate is Internet Explorer), but I absolutely fell in love with the language:D
However, I know that the REAL Visual Studio software (I just had the CD that came with my textbook) includes compiling tools for writing C++, C#, and J# in addition to VB. What exactly is the point? What are those three languages able to do that VB can't do?
Those languages run faster (VB is written in C++), are better suited for larger projects, can access the OS on a lower level and can be used on the internet (dll access).
With VB you can code quicker, but on the internet it is limited to IE no other browser supports it.
drhowarddrfine
09-08-2008, 10:16 AM
VB is interpreted while C++ is compiled. C# and J# are interpreted the first time, then compiled, and also requires .NET. All those only run on Windows.
Joseph Witchard
09-09-2008, 12:58 AM
can access the OS on a lower level
What does that mean?
VB is interpreted while C++ is compiled. C# and J# are interpreted the first time, then compiled, and also requires .NET. All those only run on Windows.
What is the difference in something being interpreted as oppose to being compiled?
NogDog
09-09-2008, 01:41 AM
Compiled: the source code is processed by a program which generates an executable, machine code file(s) for a specific platform, which generally executes faster than the same program in an interpreted language but has the drawback that it must be separately compiled for each platform and after every change in the source code. When speed and efficiency are the primary need, this is usually the way to go.
Interpreted: the source code file is read by an "interpreter" program each time the program is executed. True interpreter languages actually read one line, parse it, execute it, then go to the next line (the original versions of the BASIC language, for example). Most modern so-called interpreted languages are actually "run-time compiled" languages, where each time the program runs the source code is read and parsed in its entirety and compiled (similar to a compiled language) and then executed. In either case, you sacrifice execution speed for portability and simplicity of development, also at the expense that each platform that wants to execute that program must have the interpreter/run-time-compiler program needed to execute the program source code file (often called a "script" file).
Java kind of blurs this distinction, as it is compiled into a standardized "bytecode" format (rather than a directly executable file) which any Java platform can then execute.
Joseph Witchard
09-09-2008, 03:56 AM
Ah, all right. Thanks:)
Declan1991
09-09-2008, 04:46 PM
As for the accessing the OS at a lower level, it basically means that you worry what the program is actually doing more. You deal with allotting blocks of memory in C, and if you don't release the memory when you are finished with it, you can cause a memory leak. Also (though most OSes now stop this), if you allot too little memory to a variable, and overfill it (i.e. put "abcdefg" into a variable that can only hold "abc"), you can cause all sorts of damage, because you are rewriting random data.
Joseph Witchard
09-10-2008, 01:54 AM
As for the accessing the OS at a lower level, it basically means that you worry what the program is actually doing more. You deal with allotting blocks of memory in C, and if you don't release the memory when you are finished with it, you can cause a memory leak. Also (though most OSes now stop this), if you allot too little memory to a variable, and overfill it (i.e. put "abcdefg" into a variable that can only hold "abc"), you can cause all sorts of damage, because you are rewriting random data.
That should be easily prevented, though, shouldn't it? I mean, just declaring variables as the right type?
Declan1991
09-10-2008, 07:17 AM
If you are talking about buffer overruns (trying to define a variable as with the value "abcdefg" when it can only hold three letters doesn't really have anything to do with the type. It just means that the programmer worries about such details, as opposed to higher level languages where the language itself worries about such details.
Joseph Witchard
09-10-2008, 01:54 PM
I mean like declaring a variable that will hold an integer, and then a variable that will hold a string, etc.
Declan1991
09-10-2008, 03:54 PM
That can be in higher and lower level languages, but as a general rule, lower level languages are more likely to implement it.
chazzy
09-11-2008, 10:20 AM
I think in general your questions are about VB.NET rather than old VB (6). If so, VB.NET is also compiled. Visual Studio comes in three versions currently - 2003, 2005, and 2008. 2008 adds support for .NET 3.5 which seems to only revolve around ASP.NET, VB.NET, C#.NET, and VC++.NET. J# was dropped as it was designed as a transitional language. At this point, everything in the .NET CLR is shared, so anything you do in VB can be done in C# and vice versa. They use the same core libraries are this point.
Java kind of blurs this distinction, as it is compiled into a standardized "bytecode" format (rather than a directly executable file) which any Java platform can then execute.
.NET also creates a byte code. At this point, both are as close to machine language as one could expect, with a compiler that's still generating OS independent code.
drhowarddrfine
09-11-2008, 11:16 AM
.NET also creates a byte code. At this point, both are as close to machine language as one could expect, with a compiler that's still generating OS independent code.
I don't remember much about all this but aren't these managed languages compiled into ILASM which is eventually compiled like all other languages? Nothing generated by .NET or Java should be considered "close to machine language" anymore than any other language. Or am I misunderstanding what you are saying?
daemonk
09-11-2008, 08:26 PM
When you ask about different languages, you are gonna get tons of differing opinions. I think most people will just tell you to stick with what they are familiar with themselves. Old-school programmer will tell you C++, .Net will tell you C#....etc.
Personally, I would start learning with .Net managed code and then move to lower level code if you find it necessary.
drhowarddrfine
09-11-2008, 10:54 PM
That should be easily prevented, though, shouldn't it? I mean, just declaring variables as the right type?
A lot of people talk of the horrors of having to watch your memory allocation in C, that there is a disadvantage if you forget to release it, forgetting two things:
1) Releasing memory is part of programming an application and forgetting to do this is a programming error and not some big horrible thing about the language.
2) People have gotten lazy and want everything done for them, making them write bad bloated programs we all see today.
As your mother might say, "Watch what you're doing!" and everything will be alright.
Joseph Witchard
09-12-2008, 12:59 AM
As your mother might say, "Watch what you're doing!" and everything will be alright.
My mother tends to say something like "Holy mother of pearl" when she sees me writing programming/web code :p
Declan1991
09-13-2008, 09:25 AM
BTW, I like lower level languages, but I think showing how they can go wrong is an easy way to show the difference between higher and lower level languages.
Joseph Witchard
09-15-2008, 01:12 AM
BTW, I like lower level languages, but I think showing how they can go wrong is an easy way to show the difference between higher and lower level languages.
Meaning higher level languages wouldn't have that risk as much?
chazzy
09-15-2008, 10:10 AM
I don't remember much about all this but aren't these managed languages compiled into ILASM which is eventually compiled like all other languages?
http://en.wikipedia.org/wiki/ILAsm
You'll see that ILAsm is the assembler that converts the output of the .NET compiler into machine language.
Nothing generated by .NET or Java should be considered "close to machine language" anymore than any other language. Or am I misunderstanding what you are saying?
I have no idea what you're trying to say, probably because you don't understand what I'm trying to say. I'm not implying anything about the "style" of the machine code generated by any compiler/virtual machine. all i'm saying is that the bytecode created by either framework is very close to machine code, meaning the JIT's need to do very little to further execute it, except for some very platform (OS and chip architecture) specific commands. It's essentially why the MONO project can exist.
Declan1991
09-15-2008, 06:44 PM
Meaning higher level languages wouldn't have that risk as much?
Basically yes. Generally the more control you have over the inner workings of a program, the more efficient it is. That's why if efficiency is really important, you'd use C/C++ over PHP (written in C I think).
drhowarddrfine
09-15-2008, 09:39 PM
BTW, I like lower level languages
Everything should be done in assembly. And I'm serious.
Declan1991
09-16-2008, 12:39 PM
Everything should be done in assembly.
Can't get much lower than that, it's really something I'd like to learn when I have some time to really dedicate to it.
Joseph Witchard
09-17-2008, 11:51 PM
There are two different versions of Microsoft Visual Studio 2008: Standard Edition and Professional Edition. What benefit does one have over the other?
http://msdn.microsoft.com/en-us/vs2008/products/cc149003.aspx