The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Allow using up to the object level.

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
Eric Gunnerson

Posts: 1006
Nickname: ericgu
Registered: Aug, 2003

Eric Gunnerson is a program manager on the Visual C# team
Allow using up to the object level. Posted: Apr 22, 2004 11:16 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Eric Gunnerson.
Original Post: Allow using up to the object level.
Feed Title: Eric Gunnerson's C# Compendium
Feed URL: /msdnerror.htm?aspxerrorpath=/ericgu/Rss.aspx
Feed Description: Eric comments on C#, programming and dotnet in general, and the aerodynamic characteristics of the red-nosed flying squirrel of the Lesser Antilles
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Eric Gunnerson
Latest Posts From Eric Gunnerson's C# Compendium

Advertisement

Darren sent me a few questions. Normally, I'd put these in the C# FAQ, but I've decided to answer them here for now. They may migrate to the FAQ in time.

 

*** allow "using" up to the object level

 

I use VB sometimes, and one of the things I really love about it is that if I create a static class (say CommonFunctions)  I can import SMB.Common.CommonFunctions.  All static functions are now part of just my standard namespace.   I like it!  Object purists may have collective apoplexy, but I'd prefer to remain agnostic and believe that we shouldn't have to qualify absolutely everything we do.  Some functions really do belong in the global namespace (and all languages have some) - and it would be really nice as a developer to be able to make our own.  It's there in VB - can we have it in C#?  Please? :)

 

I think it's unlikely that we will do this. I understand the desire to be able to do this, but one of our major goals is to keep the language readable. Features like this and C++'s macros mean that to read code, you don't just have to understand the base language, you also have to understand all the additions that have been added by the author of the current project.

 

So, yes, it is true that writing Math.Sin() is longer than just writing Sin(), but it's also much clearer to any reader of the code.

Read: Allow using up to the object level.

Topic: Proudly presents MSDN Connection Previous Topic   Next Topic Topic: Hardcore XML blog

Sponsored Links



Google
  Web Artima.com   

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