Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why does C++ still exist?

Name: Anonymous 2007-12-03 2:12

Why does MS keeps maintaining such a language that caused so many buffer overflows, and generally was not as secure as C# or Vb.NET.

The only + point for C++ is that it compiles into machine code directly, and if we can get C# to do that, then there is no need for a language like C++.

I was wondering why C++ still exists when C# is that good of a language.


MS, why not retire C++, and just focus on C# and Vb.NET and F#?

Expand C# capabilities, and get rid of P/invoke and replace it with a new kind of mechanism to call dlls outside the .NET framework.

Finally, make the .NET framework really .NET, in the sense that it is distributed in terms of processing power, by enabling sharing. So that my application could use the processor that is Idle in a second room in the the house, automatically through the use of Remoting in LAN.

Kill C++, and lets all be on one page, with C#.

Its confusing many people, and things needs to be simpler, with few languages. C# for experts, VB.NET for beginners and intermediates.

That is all.

Name: Anonymous 2007-12-03 23:04

When I code I get shit done. If you can keep up with the speed I dev with C++ while maintaining high standards of quality I'd like to see it.

How? If you mean network code, the Socket class (like most) re-uses buffers for sending/receiving so there's no need to continually allocate memory.  The big advantage to writing network apps in .Net it using the default overlapped IO implementation which is verrry fast.

It sounds like you wanted to know how to map structs to arbitrary memory though, and that's not my solution to networking because fixed length protocols suck for extendability and interoperability which I need. But if you reallly wanted to you could do this, which is more for legacy purposes (win32 stucts, etc...) if you wanted to turn classes to binary I'd look at serialization, again you're probably going to have future versioning problems if you use stuff like that.
-----------------------------------------------------------
unsafe struct packet{ ... }

GCHandle pinned = GCHandle.Alloc(buffer, GCHandleType.Pinned);

packet info = (packet) Marshal.PtrToStructure(                               Marshal.UnsafeAddrOfPinnedArrayElement(buffer, 0), typeof(packet));

pinned.Free();


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List