New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Champion "Span<T>, aka interior pointer, aka stackonly struct" (C# 7.2) #666

Open
gafter opened this Issue Jun 8, 2017 · 5 comments

Comments

Projects
None yet
6 participants
@gafter
Member

gafter commented Jun 8, 2017

  • Proposal added
  • Discussed in LDM (2016-11-01)
  • Decision in LDM
  • Finalized (done, rejected, inactive)
  • Spec'ed

/cc @jaredpar @VSadov @jcouv

@gafter gafter added this to the 7.2 candidate milestone Jun 8, 2017

@gafter

This comment has been minimized.

Show comment
Hide comment
@gafter

gafter Aug 3, 2017

Member

A draft of more precise span safety rules is at https://gist.github.com/gafter/20aee8cfac801caebd19b49af180f708

Member

gafter commented Aug 3, 2017

A draft of more precise span safety rules is at https://gist.github.com/gafter/20aee8cfac801caebd19b49af180f708

@gafter gafter changed the title from Champion "Span<T>, aka interior pointer, aka stackonly struct" to Champion "Span<T>, aka interior pointer, aka stackonly struct" (C# 7.2) Sep 23, 2017

@gulshan

This comment has been minimized.

Show comment
Hide comment
@gulshan

gulshan Oct 23, 2017

The proposal link is broken.

gulshan commented Oct 23, 2017

The proposal link is broken.

@initram

This comment has been minimized.

Show comment
Hide comment
@initram

initram commented Oct 23, 2017

@gulshan The correct link is https://github.com/dotnet/csharplang/blob/master/proposals/csharp-7.2/span-safety.md

The proposal was moved to the csharp-7.2 folder

@jcouv

This comment has been minimized.

Show comment
Hide comment
@jcouv

jcouv Oct 23, 2017

Member

Fixed link. Thanks @initram

Member

jcouv commented Oct 23, 2017

Fixed link. Thanks @initram

@Nukepayload2

This comment has been minimized.

Show comment
Hide comment
@Nukepayload2

Nukepayload2 Jun 14, 2018

Are ref structs CLS-Compliant? The following code is legal in Visual Studio 15.7.2, but StackOnlyType obviously depends on a c#-only language feature.

using System;
[assembly:CLSCompliant(true)]
namespace MyLibrary
{
    [CLSCompliant(true)]
    [Obsolete("Types with embedded references are not supported in this version of your compiler.", false)]
    public ref struct StackOnlyType
    {
    }
}

Nukepayload2 commented Jun 14, 2018

Are ref structs CLS-Compliant? The following code is legal in Visual Studio 15.7.2, but StackOnlyType obviously depends on a c#-only language feature.

using System;
[assembly:CLSCompliant(true)]
namespace MyLibrary
{
    [CLSCompliant(true)]
    [Obsolete("Types with embedded references are not supported in this version of your compiler.", false)]
    public ref struct StackOnlyType
    {
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment