I feel first:
Codesta has a very energetic company, recently and Microsoft's Peter Hallam interviews, there is some very interesting information, interesting is not a question of Codesta, but the response of Peter; Codesta's question is two years ago It is mentioned that the celebrities have asked Microsoft, such as: Anders Hejlsberg, interesting is a two-year answer, the answer is more confident and it sounds more clear than two years ago, especially some strategic answers.
I want to follow these that you need to pay special attention:
1. Virtual Machine problem, why need it, what is it, and what is different from Java.
2. The design theory of C #, how CLR is cooperated with it.
3. CLR class or .NET Framework design concept, performance, object-oriented, version, upgrade processing strategy
4. If you like C # / CLR very much, what do you think is the most COOL place?
5. What will the future of C # / CLR in the future?
6. Why use c # to build your next application or back-end system? - Efficient Simple I like it!
I will smell some information from it:
1. Microsoft does not stop the appeal of pre-installed Java, with .NET Framework, what reasons for Sun Java virtual machines, even if there must be Microsoft Java VM.
2. Microsoft's future and process of C # / CLR is very clear and controlled very well.
3. Industrial support issues? How many people are supported by people in the industry, this is Microsoft is difficult to control, but it must be effort to improve.
4. C # itself, its maximum feature. It is very important if it can be a language to get rid of Made in Microsoft. It can be said that MICROSOFT covers a lot of glory, future? This doesn't seem to have a problem.
5. Interactivity, no one knows how to interact with each other in old applications and new applications, maybe .NET is Microsoft's only product that is not pulling the user through fast upgrade, connecting everything rather than conquering, Microsoft Many jears of 2003
Finally, there is some regret because the article is too long, 9CBS can't save, so I am very sorry, and provide the original address:
Http://www.codesta.com/knowledge/technical/csharp_clr/index.jsp
Mood
2003-2-25
Www.dotnettools.org/weblog/weblog.html
=================================================================================
Talking C # / CLR with MicrosoftBy Joseph Molnar
January 6, 2003
Introduction
In this article Codesta interviews Peter Hallam, the development lead for the C # compiler. With questions ranging from why Microsoft invested in the creation of the new technologies, to discussing future features, the goal of the article is to get an inside look at Microsoft's newest Programming Language, C #, And The Associated Virtual Machine, The Common Language Runtime (CLR) .a Look At Why
CODESTA: Why Did Microsoft Create a new language?
Peter Hallam: Delete XXX, too long
Codesta: Why Build a Virtual Machine if you can Guarantee your placeform?
Peter Hallam: Virtual machines allow you to do some things which can be very difficult without them Things like accurate garbage collection and code access security are dramatically easier to implement on top of a strongly typed virtual machine Also, implementing RAD environments, which blur.. The Line Between Design Time and Runtime, Benefit Significantly from Virtual Machine Technology.
Microsoft Has Employed Virtual Machine Technology In Our Products for a long time. The Entire VB Product Line Has Been Built on a Virtual Machine Which Has Evolved Since INCEPTION.
One thing that Java did was bring garbage collection (automatic memory management) into the mainstream of programming. Before Java, garbage collecting programming systems were limited to a small fraction of the programming community. Java really proved to the programming community at large that garbage collection Was Mature Enough for Real World Programming.
When COM was being designed (over a decade ago) there was serious discussion on whether it should be garbage collection based. Eventually the decision was made that the programming community was not ready for garbage collection.
The main argument against virtual machines has been performance, both memory usage and execution speed. Recent improvements in computing hardware have made virtual machine performance quite reasonable.With garbage collection firmly entrenched in the mainstream development community, and networked computing driving security concerns, you will See More and More Mainstream Programming Targeting Virtual Machines.
Discussing design Goals
CodeSta: What WERE SOME OF THE MAJOR Design Goals Behind C #?
Peter Hallam: Delete countless words and two ends of code
................ ..
Codesta: and the CLR, What WERE SOME OF ITS Design Goals?
Peter Hallam: While sharing some of the goals of C #, such as a unified type system, the CLR was designed to be a high performance platform for executing code The Microsoft Intermediate Language (MSIL), the CLR's instruction set, was designed to be. Compiled to the Native Platform at Install Time Or 'Just-In-Time' (IE During Execution) Rather Than Being Interpreted.
One of the primary goals of the CLR was to support multiple languages. This is reflected in the type system, object model and Intermediate Language (IL) which are general enough to support a broad range of languages. For the first time your C class can .
At this Moment There area over 20 Languages Targeting The CLR. Microsoft Has C , C #, VB, J #, AND JScript. Outside of Microsoft You Will Find Cobol, Eiffel, Scheme, And Many Others.
Security was also quite important, though perhaps I am not the best to describe it. In general, the CLR has a rich security model to allow trusted code to safely interact with untrusted code.Experience with DLL's and general application installation also played a role in designing the CLR. In particular the CLR was designed to allow easy deployment of applications, and to ensure that existing deployed systems are robust when new versions of existing components are installed. The CLR allows running multiple versions of the same component side by side.
A Few Deeper Details
Codesta: with Microsoft's Push for IncreaSed Security, How Was The CLR Affected?
Peter Hallam:. Making it easier for our customers to write secure code is one of the core goals of the CLR Running code on a secure virtual machine allows the barrier between untrusted and trusted computing to exist inside a single process Trusted components can leverage the. Services of Untrusted Components WITHIN THE SAME Process. The CLR Enables You To Write Secure Components In this Manner and Evolves The Programming Model Forward with respect to security.
Writing secure code is extremely difficult however, and there are no silver bullets. The only way to write secure code is to think hard about security through the entire design and development process. Secure code can be written using most programming environments. The CLR makes it Easier for Programmers To Deliver Secure Solutions.
CODESTA: C # / CLR HAS 2 Kinds of Code, Safe and UNSAFE. What is it Trying to provide and how did this affect the virtual machine?
Peter Hallam: for c # The Terms Are Safe and UNSAFE. The Cl R Uses The Terms Verifiable and Unverifiable.
When running verifiable code the CLR can enforce security policies; the CLR can prevent verifiable code from doing things that it does not have permission to do When running potentially malicious code, code that was downloaded from the internet for example, the CLR will only. run verifiable code, and will ensure that the untrusted code does not access anything it does not have permission to access.The use of standard C style pointers creates unverifiable code that. The CLR supports C style pointers natively. Once you've got A c style to any byte of memory in the process, so The runtime cannot enforce security policy. actually it could but it is impractical.
Unverifiable code is useful for interoperating with existing non-CLR code (existing C DLLs and COM components). It can also be useful when dealing with existing binary formats found in things like disk files and low level network protocols. This way you do not NEED TO WRITE CUSTOM MARSHALLING CODE IN C To Access Legacy Components and Binary Formats.
Any unverifiable code must be fully trusted for the CLR to run it. Unverifiable code is often used to write a secure API on top of an existing legacy component. Many of the .NET Framework libraries are written entirely in C # using unsafe features to access the Underlying Platform.
The term unsafe has always bothered me. Unsafe code in C # really means more power to access the machine at a lower level without resorting to a lower level language like C. It is certainly possible to write safe secure applications in unsafe C # in the same way that it is possible to write secure applications in C. The difference is that in safe C # the strongly typed nature of the language and the security features of the runtime make it significantly easier to write secure code.When using unsafe C #, as with standard C code, much more of a burden is placed on the coder to write safe secure code. The tradeoff between safe and unsafe code is really productivity versus power. It is not a tradeoff of safety. The C # language designers wanted to discourage the use of C STYLE POINTERS AND SO The BEST Keyword The Found Was The Unfortunately named 'Unsafe'.
Codesta: in The Early Days of Java You create, COMPILER / VIRTUAL MACHINE. How Would You Compare The Java and CLR VIRTUAL MACHINES?
Peter Hallam: The CLR Design Is Much More Mature Than The JVM. The JV Made Some Design Chade Have Proven To Be Fairly Limiting in The Real World.
The JVM byte code was originally designed to be interpreted even though most implementations of the JVM now compile to the native machine for better performance. MSIL was designed to be compiled up front so it is more compiler friendly.
The JVM was designed with only one language in mind so it is missing many useful constructs which makes targeting the JVM painful for other languages. This includes the lack of user defined value types, delegates (type safe function pointers), byref types as well as Pointer Types.
The JVM's class file format and deployment model have a number of shortcomings. The class file format makes some sense if you are deploying a single class at a time, but in the real world that rarely happens. Typically you deploy a library of inter-dependant classes which you've tested together.In addition, the JVM has no story for executing multiple versions of a class library in the same environment. The CLR's side by side features and deployment model is an enormous win.
Finally, JNi, The JVM's Interoperability Story, IS Extreme Weak. To Interoperate with existing code You Must Always Write a Custom Marshaling Layer in Another Language Like C / C .
In C # and the CLR most legacy code can be accessed directly from C # code using the built-in platform invoke and COM interop features of the CLR and the unsafe features (C style pointers) in C #. This lowers the bar to interoperating with legacy systems ..............................
High level constructs provided by strongly typed object oriented languages are great for building complex systems but ultimately it all comes down to bits. Java and the JVM really make it difficult to access the underlying computing platform.
A Broad Look At the Features
Codesta: Microsoft Has Offen criticized for ITS LAS OF INNOVATION. What Features of C # and the clr Are Truly Innovative?
Peter Hallam: The List Here IS Pretty Long So I'll Stick To A Few Highlights:
The Unified Type System
The deployment and versioning support
Supporting Multiple Languages
It is also true that many of the innovations in C # and the CLR are evolutions of technologies and designs which have been around for many years. Garbage collection is a good example. Garbage collection, including the features for getting good performance such as incremental and concurrent garbage collection, has been around for several decades The garbage collector in the CLR, which was built upon research from the compuer Science community, is truly world class.Codesta:. Where did some of the C # / CLR language features get their inspiration from?
Peter Hallam: C # and the CLR draw heavily from existing computing practice and theory C # inherits most of its features from the C and C family of languages Garbage collection comes from the dawn of computing (aka before I was born) Many of the... component features (properties, delegates and events) come from the VB and COM world. The unified type system sprang from a desire to get the ease of use of fully object oriented type systems from languages like Smalltalk and combine it with the performance benefits of type Systems from Languages Like C and Pascal. The Versioning Features Are Pretty Much New TO C #.
CodeSta: Are there any future features in c # or the clr you can talk about?
Peter Hallam: Anders Hejlsberg, The Chief Designer of C #, Announced Some of The Plans for C # At Oopsla 2002 in
Seattle
.................. ..
Taking a closer look at generics, we've had some really smart guys in our research department working on a design for both C # and the CLR and they've done some amazing work. By adding generics to the CLR as well as to the language WE Really Hit The Sweet Spot in All Dimensions - Execution Performance, Type Soundness, Type Identity, Msil Size, And Native Code Size.here's A Quick Example of What Generics Will Look Like:
Class Stack
Some Miscellaneous Questions
Codesta: in Their Current Incarnations, Would You Say C # or THE CLR Are More Suitable for Front-End DEVELOPMENT ORBAK-End DEVELOPMENT?
Peter Hallam: Yes and Yes.
VB has been, and continues to be, Microsoft's premier front-end development tool. VB .NET, targeting the CLR, is the next step in Microsoft's RAD client side tools. C # .NET leverages much of the VB .NET design time tools and Libraries SO IT Has A Great Client Side Development Story As Well. a Lot of Great Things Like this Fall Out Because The Cl R and The .NET Framework Libraries Are Designed to Be Multi Language.
On the server side we've got ASP .NET, web services, database integration ... everything you want to write server side apps. We've gotten a ton of positive feedback on the runtime performance and programmer productivity of ASP .NET. Codesta: is there ies the Possibility of Seeking, or Maybe Parts of Future Versions of Windows Implement In C # and / or making use of the clr?
Peter Hallam: Actually some parts of Visual Studio .NET are already written in C # Microsoft has made a huge bet on the CLR being a key part of our future platforms and you can expect to see that reflected in everything we do going forward..
Codesta: in General, What Kind of Industry Support Have you see for c # and the clr?
. Peter Hallam: I'm probably not the right guy to ask about this, but the few times I have talked with customers I've received very positive responses There are C # development tools being produced by other vendors; this is a great indication of Industry Support Behind C # and The CLR. We've Also Had a Lot of Interest In The CLR from Academia with The Cl R Being Used As The Target of Many Research Compilers.
Codesta: What is your view of projects like bringing c # and the clr to non-microsoft platforms?
Peter Hallam: I Think The Mono Project Is A Great Validation Our Direction with C # and the clr. It's great to see an independent importation of c # and the clr. I Look Forward to seeing what.
C # and the Common Language Infrastructure (the CLI, a subset of the full Microsoft CLR) have been accepted as international standards by ECMA. Microsoft has also released Rotor, a shared source implementation of C # and the CLI which targets Windows XP, FreeBSD, and More Recently Mac OS X 10.2.CODESTA: FINAL Questions, Why Use C # to build your next application or back-end system?
Peter Hallam: Productivity. Simple as That.
C # 's Goal Is To Be The Most Productive Way To Deliver Your Solution WHether It's A Rich Client Or Server.
Conclusion
Codesta Would Like To Than Youk Peter Hallam for His Time and His Willingness To Answer The Questions. C # and The CLR Are Important Microsoft Technologies and The Insight Is Much AppReciated.
If you have any questions or comments regarding this article, please do not hesitate to e-mail comments@codesta.com!
Reference Material
Peter Hallam's Biography
With over 10 years of experience Peter Hallam is the development lead on the C # compiler and a member of the C # language design team. He has worked at Microsoft for 7 years spending the last 4 years on the C # compiler. In previous roles at Microsoft he Worked on Visual Basic for Applications, Ole Automation, Windows CE, AND 64-Bit Windows XP. Before Joining Microsoft He Was A Software Engineer At Iris Power Engineering and Citibank. Peter Hallam Graduated from THE
University
Of
Waterloo
IN 1994 with a Bachelor of Mathematics.