I suggest you ...

Add dynamic<T> to the DLR

Extend the DLR with a dynamic<T> type. This would let you specify the type that members would be, but leave what members exist as dynamic. It would allow compile time checks on everything except member names and would be very useful if you had something like a Dictionary<string,Guid> as you're member names would match against the string, but the compiler would know you were returning a Guid.

3 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Forbes LindesayForbes Lindesay shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • QwertieQwertie commented  ·   ·  Flag as inappropriate

        Yeah, this is an extraordinarily random suggestion. It would make more sense to suggest that "dynamic<T> x" means that (x is T) so that some calls can be early-bound (if they exist in T), but other calls (that don't exist in T) will be late-bound.

      • Timwi TerbyTimwi Terby commented  ·   ·  Flag as inappropriate

        This suggestion makes no sense. Would you provide an example to describe what you mean?

      Feedback and Knowledge Base