DIP60: @nogc attribute

Paulo Pinto via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 19 05:06:24 PDT 2014


On Saturday, 19 April 2014 at 05:08:06 UTC, froglegs wrote:
>
>> 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.
>

Doesn't change the fact it is possible, but hey lets sell C++ 
agenda.

>
>>> C++ exposes SSE/AVX intrinsics, C# does not.
>>
>> That is not correct.
>>
>> 1 - Nowhere in the ANSI/ISO C++ are SSE/AVX intrinsics 
>> defined, those are compiler extensions. So equal foot with the 
>> C# EMCA standard;
>
>  Duh, but every C++ compiler exposes this, so it is defacto 
> standard. C++ has plenty of non-standard standards, such as 
> #pragma once.
>
>
>> 3 - .NET Native and RyuJIT have official support for SIMD 
>> instructions, GPGPU support is also planned
>
>   I see on MS website an article about having a vector data 
> type. While interesting that isn't the same as exposing the 
> actual instructions, which will limit potential gains.
>
>  The aricle 
> http://blogs.msdn.com/b/dotnet/archive/2014/04/07/the-jit-finally-proposed-jit-and-simd-are-getting-married.aspx
>
>
>  Additionally .NET native will be MS only--

Except it already exists today with Mono. Microsoft is just 
making the official .NET do something, Xamarin has been doing the 
last years already, both in static native compilation and SIMD 
support.

Any language can expose SIMD instructions, there is nothing 
special about them in C++, because like every other language, 
they are compiler extensions. Regardless of being a defacto 
standard or not.

If I take the C# side on this, even though I also like C++, is 
because we are in a D forum, and having a C# native toolchain 
will certanly help young developers understand we don't need VMs 
for memory safe systems programming languages.

Oberon compilers in the mid-90's were producing code that was as 
good as C compilers back then. On those days I still wrote a 
couple applications 100% in Assembly.

I think many value too much C and C++ compilers, because they 
forget how long they have been around, and also never used 
alternative system programming languages back when C and C++ 
compilers used to suck.


--
Paulo


More information about the Digitalmars-d mailing list