Git Product home page Git Product logo

Comments (21)

weshaggard avatar weshaggard commented on July 18, 2024 3

I will add both TypedReference and ArgIterator back to the standard.

from standard.

jkotas avatar jkotas commented on July 18, 2024 2

Opened dotnet/ef6#619

from standard.

terrajobst avatar terrajobst commented on July 18, 2024 1

Are there platform that would not be able to use this feature in the future

Potentially. We're walking a tight rope here. On the one hand side, we don't want to include large amounts of API into the .NET Standard that aren't/cannot be implemented everywhere. However, we also have to consider cases where if the producer of the .NET Standard library doesn't care about all the platforms but wants to share with a specific set of platforms that have this functionality. For larger components, such as registry, it makes sense to make the APIs available as additional packages that those projects can consume. But for tiny APIs like TypedReference and ArgIterator it's just not worth it.

Future platforms are likely forks of the existing open source stacks. Mono/Xamarin support both concepts. As @jkotas said, .NET Core's implementation for ArgIterator needs fixes to work on Unix. It's possible that we never add it, but I doubt that we'd go out of our way to remove these smaller features, unless we run into real issues.

from standard.

weshaggard avatar weshaggard commented on July 18, 2024 1

After further discussion we decided to remove ArgIterator and the __arglist overloads from the standard because the amount of work to even make them throw PNSE isn't worth any tiny value it might provide. Removed with 52651e7.

from standard.

weshaggard avatar weshaggard commented on July 18, 2024

Removed with 6e3ad13.

from standard.

terrajobst avatar terrajobst commented on July 18, 2024

It looks like the managed linker might depend on TypedReference outside the C++/CLI and __arglist scenario.

@russellhadley @erozenfeld @swaroop-sridhar can you elaborate your dependency on TypedReference?

from standard.

weshaggard avatar weshaggard commented on July 18, 2024

I assume this related to https://github.com/dotnet/corefx/issues/14088. Is it only TypedReference that is needed?

cc @jkotas

from standard.

erozenfeld avatar erozenfeld commented on July 18, 2024

It turns out that the managed linker doesn't have to depend on TypedReference so that shouldn't be considered a reason to bring TypedReference back. dotnet/corefx#14088 is a different motivation to bring it back.

from standard.

terrajobst avatar terrajobst commented on July 18, 2024

I'd say that given we originally removed it due to dubious use we should now bring it back. First, API Port telemetry shows it's used in 2 percent of our reports, which is quite a bit considering the low-level nature of this type. Also, considering dotnet/corefx#14088 it seems to be general useful.

And on top, .NET Framework and Xamarin/Mono already have the type. I believe this is also true for CoreCLR. Not sure about CoreRT/MRT, but that's a different issue.

@weshaggard, any objections exposing this type?

from standard.

danmoseley avatar danmoseley commented on July 18, 2024

There is still time to do this for NS2.0 if it's mainly just exposing something. As Immo mentions of course it needs to work on MRT.

from standard.

jkotas avatar jkotas commented on July 18, 2024

It looks like the managed linker might depend on TypedReference

We should fix the linker to not depend on it.

from standard.

jkotas avatar jkotas commented on July 18, 2024

First, API Port telemetry shows it's used in 2 percent of our reports, which is quite a bit considering

I missed this part. Yes - if you see this type being used a lot, I agree we should bring it back.

it needs to work on MRT

There is nothing fundamental that prevents it work on MRT. It is just some extra work in the NS2.0 bucket.

from standard.

terrajobst avatar terrajobst commented on July 18, 2024

Excellent. So it seems we should expose it then.

@weshaggard, press the magic button 😄

from standard.

jkotas avatar jkotas commented on July 18, 2024

TypedReference and ArgIterator back to the standard.

Sounds reasonable to me.

ArgIterator implementation in .NET Core will need codegen and runtime work, on Unix at least. The codegen teams will need to be involved in the implementation. It should throw PNSE until this work gets done.

from standard.

Thaina avatar Thaina commented on July 18, 2024

I have curios for such times that, how many platform derived from dotnet could use TypedReference and ArgIterator

Such as xamarin that compile to mobile platform, especially iOS which is prohibited runtime code generation. It can use Reflection but cannot use Reflection.Emit. Can it use TypedReference?

There are also webassembly that would parsed from llvm compiled C#. Are there limitation that make it not compatible?

I don't know where to ask this question, sorry if this is wrong place

from standard.

jkotas avatar jkotas commented on July 18, 2024

There is nothing about TypedReference or ArgIterator that requires runtime code generation.

from standard.

Thaina avatar Thaina commented on July 18, 2024

@jkotas I mean there are many reason each platform cannot implement some feature. TypedReference used to be not supported on some platform in the past. I just curious that, even it was brought into standard. Are there platform that would not be able to use this feature in the future

from standard.

weshaggard avatar weshaggard commented on July 18, 2024

reverted with #162.

from standard.

EgorBo avatar EgorBo commented on July 18, 2024

@weshaggard EntityFramework6 uses String.Concat with __arglist overload:
https://github.com/aspnet/EntityFramework6/blob/master/src/EntityFramework/Core/Objects/ELinq/MethodCallTranslator.cs#L1493

if you run this on .NET Core you will get null

from standard.

jkotas avatar jkotas commented on July 18, 2024

@EgorBo Is there a bug on this in EF6? We do not have plans to add cross-plat vararg support to .NET Core in near future. It would be best for EF6 to fix this.

from standard.

EgorBo avatar EgorBo commented on July 18, 2024

@jkotas I don't think so, I am here just to leave a note 🙂 some of our users hit this issue with CoreFX String and EF6 packages on Mono: mono/mono#9996 (and the fix is mono/mono#10452 (review))

from standard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.