1. Computing & Technology

Discuss in my forum

Michael Morin

On 'case' and 'class'

By , About.com GuideAugust 22, 2010

Follow me on:

While dynamic programming and duck typing often make it a bad idea to do so, it's sometimes useful to do different things based on the type of a given variable. For example, if the type of a variable is a URL, fetch that URL, otherwise, open it as a file. There are usually better ways of doing things, but this is often the most direct way.

Read the complete article.

Comments
No comments yet.  Leave a Comment
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2012 About.com. All rights reserved.

A part of The New York Times Company.