-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
CLR enhancements for future features #166
Comments
Generic indexer properties cannot currently be represented in metadata, even though the backing accessor methods can. Motivating example: http://stackoverflow.com/a/2178769 |
Heh, variadic generics would probably be cool but of all possible things you could add to the runtime this is likely the most difficult to implement. Do you know of a language that has this (apart from C++)? |
@mikedn: Typed Racket has it, and follows a similar approach (like C++) with their macro system, 'instantiating' an implementation based on the callsite (or explicitly). There is the following paper that describes the implementation details: http://www.ccs.neu.edu/racket/pubs/esop09-sthf.pdf It also has a verification of the proposed implementation (which seems to map well to IL/MD requirements). |
Some concept of shared type identity -- useful for merging all versions of e.g. There is TypeIdentifierAttribute, but it's limited to some interop scenarios. |
@ashmind That almost sounds like anonymous classes in Java, but being really anonymous. Not sure if anything needs to be added to the CLR for that to happen. The compiler should be perfectly capable to determine what it needs at compile-time (and generate efficient code for it). Example: For every anonymous class, the compiler could generate a matching interface. This type could be shared (or proxied) across assemblies/appdomains. |
@leppie CLR work is to merge the type from all the loaded assemblies, so you could pass an instance created in one into another. You wouldn't be able to cast using compiler alone, unless compiler would take over all the casts in the code (and even then Reflection would fail). I am not talking about only anon types, I am talking about marking any two types form diff assemblies as identical, as long as they have identical structure. |
Another thing -- limited support for generics over That might require some sort of opt-in on generic type, as |
|
@HaloFour @ashmind I think accepting For sure it would simplify the duplicated code between The only language that I know of and which does that is Javascript (functions without return values actually "return" |
Access to unsafe intrinsecs via Helper Methods for useful opcodes like PREFETCHxx that can be NOP or substituted in architectures that don't support them. |
Support for |
@MrJul That would require additional runtime support, if I recall correctly. Would |
@HaloFour Yes, a CLR change is required, isn't that the point of this thread? :) It should be encoded as a bool and an int. |
@mirhagk True, but the split in Python is not without its troubles... there are many libraries that have never been ported to 3.0 and trying to do so is a pain if you need them. Therefore, unless you are working on a 3.0 project many people choose to stick with 2.0. |
This is an open-ended discussion for enhancements to the CLR that is required to accommodate new features that cannot be implemented on the current runtime or by the compiler.
As with PEVerify, enhancements should be categorized as MD (metadata) or IL.
An example of such a CLR enhancement would be variadic generic type parameters for optimal dispatching and verification.
A hypothetical pondering thought: https://gist.github.com/leppie/f9c773ea0d69459d7021 (I dont see this happening any time soon)
The text was updated successfully, but these errors were encountered: