| By Derek Ferguson | Article Rating: |
|
| January 1, 2000 12:00 AM EST | Reads: |
12,385 |
(Microsoft Chief Architect and Distinguished Engineer Anders Hejlsberg, inventor of the C# programming language, which underpins .NET, granted an exclusive interview to .NET Developer's Journal for its premier issue, coming in January 2003. As a preview, Derek Ferguson covers highlights from Hejlsberg's OOPSLA presentation.)
(November 20, 2002) - Anders Hejlsberg delivered a speech to the attendees of the recent OOPSLA conference in Seattle in which he described four new features to be incorporated into the C# programming language. These were: generics, Iierators, anonymous methods, and partial types.
Generics is a technology developed largely by Don Syme and Andrew Kennedy of Microsoft Research. Similar to C++ Templates, generics are much more powerful. For example, in C#, developers will be able to restrict the types of the "wildcards" used to concretize their generics, which is impossible when using Templates under C++.
Iterators are being added to solve a usability problem with the C# language as it currently stands. Specifically, in order to use the foreach keyword under C# now, developers have to make their objects implement the IEnumerable interface. Unfortunately, this is a rather cumbersome interface to implement. Going forward, developers will be able to implement an iterator that will allow the use of the foreach keyword simply by adding a method with the following signature to their class:
public Object foreach()
The third language alteration - which nearly produced a standing ovation from the assembled crowd - was the addition of so-called "anonymous methods." This is a step in the direction of Java's "anonymous classes," which allow entire bits of functionality to be defined at their point of use without even being given a name for later reference. Hejlsberg indicated later (during an exclusive .NETDJ interview) that he feels that this kind of behavior might not always lead to the most truly object-oriented of designs.
Finally, partial types will be introduced to change the existing one-to-many relationship between C# source files and classes into a many-to-many relationship. What is the practical value of this, you might ask? It allows a single class to be defined in multiple files that may then be created and managed via different entities.
For example, an automated code generation tool might be responsible for creating the parts of a class dealing with the user interface, while the human-generated code for this class is all kept safely in another file. In this way, classes can be safely "round-tripped" between generators and human beings with far less danger of accidental code overwrite.
For more information on C#, see www.csharp.net.
Published January 1, 2000 Reads 12,385
Copyright © 2000 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Derek Ferguson
Derek Ferguson, founding editor and editor-in-chief of .Net Developer's Journal, is a noted technology expert and former Microsoft MVP.
![]() |
David Bennett 01/02/03 10:59:00 PM EST | |||
Horray! These upgrades to C# are great. Java sucks compared to .NET and in the end everyone knows Microsoft is the champ. The last time I tried developing a Java application my notepad text editor crashed. Microsoft tools are 'just slightly' easier to use. - David Bennett |
||||
![]() |
Miguel Katrib 11/21/02 06:55:00 PM EST | |||
Hurra! for the generics and iterators inclusions in C# We propose similar features for Eiffel language see Collections and Iterators in Eiffel, Journal of Object Oriented Programming, Vol 6, No 7, Nov/Dec 1993, USA. |
||||
![]() |
Brendan Johnston 11/21/02 12:25:00 PM EST | |||
The only "non-oo" feature is anonymous functions. The Inventor of the term Object Oriented, Alan Kay, included anonymous code blocks in the OO language he developed, Smalltalk. Generics and partial types allow you to create a class. Classes are an OO feature. Iterators seem to fix an inconvenience in the design of containers. Brendan |
||||
![]() |
M. Whitener 11/20/02 05:19:00 PM EST | |||
For too long, OO has been held up as an absolute good. This attitude might have been understandable in the late 1980s, but the popularity of Java has extended OO's time in the limelight. These new features of C#, while very useful, have nothing to do with OO, and in fact mostly cannot be achieved using straight OO! Many newcomers to computer science and engineering (Java zealots) will point this out in a negative light. But the fact is that OO is only one useful view of reality. Congratulations to Hejlsberg and MS for recognizing this. |
||||
- Acquia Announces Two New Board Members
- CollabNet Adds Board Member and Senior Executives to Fuel Continued Growth in Agile ALM and Enterprise Cloud Development
- Learn Open Source Database Tools from Stanford for Free
- Research and Markets: Global Mobile Device Management Enterprise Software Market 2010-2014 Includes a Discussion of the Key Vendors Operating in This Market
- Alternative Search Engines for the Contemporary User
- FORTUNE Magazine Names Rackspace Among “100 Best Companies to Work For”
- New York City : Blueprint for Cloud-enabled economic transformation
- EnterpriseDB Announces Availability of Postgres Plus Cloud Database
- Connectria Hosting Achieves "Off the Chart" Operational Efficiency With Cloud-Based Storage Solution From Nexsan and CommVault
- ICOS and Joyent Announce Strategic Partnership to Deliver Joyent's Cloud Infrastructure Solution to Channel Partners and Service Providers
- eXo Platform 3.5 Now Available: First Cloud-Ready Enterprise Portal and User Experience Platform-as-a-Service (UXPaaS)
- Research and Markets: WordPress 24-Hour Trainer, 2nd Edition
- Five Years Waiting for JRE 7: Is It Justified? (Part 1)
- Book Review: The CERT Oracle Secure Coding Standard for Java
- Acquia Announces Two New Board Members
- CollabNet Adds Board Member and Senior Executives to Fuel Continued Growth in Agile ALM and Enterprise Cloud Development
- Learn Open Source Database Tools from Stanford for Free
- China suppliers of mobile phones expand range with more smartphone and 3G models
- Research and Markets: Global Mobile Device Management Enterprise Software Market 2010-2014 Includes a Discussion of the Key Vendors Operating in This Market
- Government Big Data Solutions Award Nominee: Wayne Wheeles (Sherpa Surfing)
- Alternative Search Engines for the Contemporary User
- FORTUNE Magazine Names Rackspace Among “100 Best Companies to Work For”
- New York City : Blueprint for Cloud-enabled economic transformation
- EnterpriseDB Announces Availability of Postgres Plus Cloud Database
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- Creating Web Applications with the Eclipse Web Tools Project
- Eclipse Special: Remote Debugging Tomcat & JBoss Apps with Eclipse
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- SYS-CON Webcast: Eclipse IDE for Students, Useful Eclipse Tips & Tricks
- How to Bring Eclipse 3.1, J2SE 5.0, and Tomcat 5.0 Together
- Eclipse: The Story of Web Tools Platform 0.7
- "Eclipse 3.0 is a Great Leap Forward," Says JDJ's Dudney
- The Top 250 Players in the Cloud Computing Ecosystem
- Developing an Eclipse BIRT Report Item Extension





















