View Single Post
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#158
Originally Posted by attila77 View Post
Yes, I understand that, but IMO that's more syntactic sugar/policy question than a technical differentiation.
Huh? If there is something it isn't, it's syntactical sugar.

By declaring an unsafe context/scope you bypass the strict typing checks (not totally, but almost) and if you use fixed pointers you bypass the GC, not letting it move the pointed at memory.

This isn't sugar in any way, shape or form. This is affecting the compiler and the runtime behaviour.

The choice is still yours, it's just that you have less 'are you sure' dialogs
Sure, you can stay away from it, but if you use it, you need to use these special constructs, bypassing things and affecting others. Which was my point.

C# offers pointers, but not in the same way as C++, or C. If you use them, you're letting go of some fundamental features of the language along the way.
 

The Following User Says Thank You to Joorin For This Useful Post: