The Artima Developer Community
Sponsored Link

.NET Buzz Forum
IanG on Latent Typing

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brad Wilson

Posts: 462
Nickname: dotnetguy
Registered: Jul, 2003

Brad Wilson is CTO of OneVoyce, Inc.
IanG on Latent Typing Posted: Jan 6, 2005 2:36 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Brad Wilson.
Original Post: IanG on Latent Typing
Feed Title: The .NET Guy
Feed URL: /error.aspx?aspxerrorpath=/dotnetguy/Rss.aspx
Feed Description: A personal blog about technology in general, .NET in specific, and when all else fails, the real world.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Brad Wilson
Latest Posts From The .NET Guy

Advertisement

IanG goes to town on latent typing (which he doesn't think I'm talking about), and compares C++ to C# to Python. Obviously, I like the Python example the best, because it is the most power with the least amount of cruft.

Ian points out a way to get the type of thing I want using reflection:

public static void CallDraw<T>(T something)
{
    something.GetType().GetMethod("Draw").Invoke(something, null);
}

I feel like I have to point out that templates aren't even necessary here. You can do this, today, in .NET 1.1:

public static void CallDraw(object something)
{
    something.GetType().GetMethod("Draw").Invoke(something, null);
}

Nice read, though. He really hits all the points, and talks about why things are done the way they're done. It doesn't make me any happier, but I'm willing to use a different phrase than "latent typing" if that makes Ian happy. :)


This content is syndicated from The .NET Guy. The original post is IanG on Latent Typing.

The opinions expressed herein are solely those of Brad Wilson, and not meant as an endorsement of or by any other individuals or groups. This syndication is provided for the private, personal use of individuals. Unauthorized commercial reproduction is strictly prohibited.

Read: IanG on Latent Typing

Topic: A Day of .NET in Columbus Previous Topic   Next Topic Topic: Securing your Web Service

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use