I believe Concepts lite in C++ works around this by allowing a
syntax like this:
void foo(InputRange{T} range1, InputRange{T2} range2)
vs.
void foo(InputRange range1, InputRange range2)
If they are the same type.
I believe the objection is that the proposed syntax can't tell
the
feels like writing C++ with C# syntax.
Ahem. C++ has RAII k thanks. C++ C# Proof.
Here is an alternative:
1. classes are unique by default, they cannot be shared. No GC
or RF required, and covers 90% of objects.
2. To share, retype as GC, the requirement being that it does
not have a destructor.
Also possible in C# with structs, interop annotations and
unsafe blocks.
And now you aren't using the language, but a (very) poor subset
of a language that doesn't even support templates.
C++ exposes SSE/AVX intrinsics, C# does not.
That is not correct.
1 - Nowhere in the ANSI/ISO
Well, most of the new games (Unity3D) are done in C# nowadays
and people live with it even though game development is one of
the biggest C++ loving and GC hating crowd there is.
Unity3D the engine is written primarily in C++, not C#.
The Unity editor and gameplay code is written in C#
I am really looking forward to .NET Native becoming widespread.
Then this type of comparisons (C# vs C++) will be quite
different.
I don't think it will make a major difference. Taking a GC based
language and giving it a native compiler doesn't automatically
make it performance
I know it does, but users employing @nogc still have to manage
memory somehow. Let's add hooks to the runtime and implement
some GC alternatives, and then see what demand is like ;-)
They use noGC and smart pointers/manual ala C++.
You seem to be suggesting that people who don't want