PDA

View Full Version : .NET question



face_master
04-25-2002, 11:37 PM
In the FAQ, it says that .NET can be used to write programs using several different languages togetherin the same program as long as they are in different source files. How can this be done? Wouldn't they be incompatible to work together?

xds4lx
04-25-2002, 11:46 PM
No they wouldnt be incompatible. When you buy .Net or any other version of Visual Studio you are able to do things like this. It will only work with languages supported through the .NET and it can be kinda interesting to try. Things like this are done in java (native code) all the time.

face_master
04-26-2002, 12:01 AM
Could you give me an example of where this technique is applied (other than the one you just gave) and tell me why this is done? What are the advantages?

nvoigt
04-26-2002, 12:26 AM
>What are the advantages?

Algorithms in C++.NET might be a bit faster, while the front end in C# will be easier to program.

You can do this because all files produce IL code and the IL code is then put together into one program. All .NET languages use the same framework and class library. The string in VB is the same as the one in C# or C++.NET.

I never heard any Java example of the same thing though, as Java is only one language.

face_master
04-26-2002, 12:52 AM
>>All .NET languages use the same framework and class library.

So, only OO languages would be used in .NET?

face_master
04-26-2002, 12:53 AM
So, is the actual language changed, or just the way its used (ie. is C++ different from C++.NET)

nvoigt
04-26-2002, 05:41 AM
>So, only OO languages would be used in .NET?

I think so, yes.

>is the actual language changed

Not the language itself, but the classes that are used.
C++.NET has no MFC, but uses the same class library as C# and VB and any other .NET language.

Barjor
04-26-2002, 09:42 AM
Another good thing is that everyone can program in the language they like best. a VB program can work perfect with a Cobol program. But this also mean that managed C++ lost is edge over VB and such.

no-one
04-26-2002, 02:15 PM
>
>is the actual language changed

Not the language itself, but the classes that are used.
<

actually it somewhat has, some features have been removed from C++.NET such as multiple inheritance, and a few others i can't remember now... but most people who decide to use .NET won't miss them though.

i on the other hand shall stick with the originals. C and C++.

Barjor
04-26-2002, 02:40 PM
Does the STL work with .NET?

no-one
04-26-2002, 03:47 PM
that i don't know.

Barjor
04-26-2002, 03:53 PM
Me neither. I would think it does. I find it strange that they can remove multiple inheritance and still call it C++.

xds4lx
04-26-2002, 05:16 PM
Those things are only removed in manages C++, in native C++ everything is the same, plus the STL is better than in MSVC++ 6.

no-one
04-26-2002, 06:14 PM
>plus the STL is better than in MSVC++ 6.

the STL was in MSVC!!!!!!

Fordy
04-26-2002, 06:20 PM
Originally posted by no-one
>plus the STL is better than in MSVC++ 6.

the STL was in MSVC!!!!!!

I think he's talking about the MFC container classes.....

no-one
04-26-2002, 06:22 PM
i'm also just being sarcastic too, cause template support sucked in MSVC to the point i just gave it up.

Barjor
04-26-2002, 06:27 PM
In what ways did it suck? Anything in particular it didn't support or work with? I haven't really used the templates and MSVC that much. I rather use gcc when I do that stuff.

no-one
04-26-2002, 06:35 PM
fist they were impossible to get working for someone trying to learn(keep in mind i was new to them and C++ about 2+ years ago, so all i have are bad memories), all kinds of internal compiler errors, virtually none error messages associated with templates are defined, so when you get a compiler error, you have no help and you have no clues as to whats causing it you or something else, the only thing they work on is simple stuff...then they're fine but man don't try anything big.

besides that even Bjarne Stroustrup said the template support in VC was lacking

::edit:: a lot of repressed memories...hehe

xds4lx
04-26-2002, 08:58 PM
No what I was saying is that the implementation of the STL used in the C++.NET is a lot better than what MSVC 6 had.