Discussion: lightweight dynamic #539
Replies: 6 comments
-
It surely would semplify the use Dictionaries, json and so on... I'm less sure that this have sense: var r = obj.$Method(); why not simply call the method directly? |
Beta Was this translation helpful? Give feedback.
-
Are you also suggesting a new object model for dynamic types as an alternative to |
Beta Was this translation helpful? Give feedback.
-
When you want to handle calls as "messages" and you don't have a fixed scheme this'll help. |
Beta Was this translation helpful? Give feedback.
-
If it's relying on either an indexer or some |
Beta Was this translation helpful? Give feedback.
-
Sounds a little like D's forwarding operator. |
Beta Was this translation helpful? Give feedback.
-
I meant the Try methods themselves. Even though Try methods in a DynamicObject are somehow known to the DLR, the compiler needs to emit dynamic call-sites for |
Beta Was this translation helpful? Give feedback.
-
Moved from dotnet/roslyn#16077
This can be a lightweight compile-time alternative to
System.Dynamic.DynamicObject
,Open question: should we implicitly cast the result to the target type?
Related: dotnet/roslyn#3555
Beta Was this translation helpful? Give feedback.
All reactions