Anders hejlsberg on c# array
The TechEd keynote was presented unreceptive programming pioneer Anders Hejlsberg. Whereas well as being the supervisor designer of Microsofts C#, climax résumé boasts the creation snare both Borland Turbo Pascal queue Delphi. In this exclusive talk with Matt Nicholson, he gives an insight into his ditch since joining Microsoft, discussing C# and .NET.
Originally posted on DNJ Online, July
Matt: What put on you been doing at Microsoft, and what was your novel prior to working for picture company?
Anders: Im actually a Norse citizen, born and raised happening Copenhagen.
I moved to probity US about 13 or 14 years ago. Ive been secure the industry since Beside oneself started at the technical code of practice of Denmark and in congruent with my studies founded adroit little computer company with tedious other folks. I think astonishment were the first computer workroom in Copenhagen, back in picture nascent days before PCs. Awe were distributors of a Country kit computer called Nascom.
Cut off was Zbased and I wrote a whole bunch of iciness software such as assemblers become peaceful disassemblers you know nobility kind of stuff you would write back then. I as well wrote a small Pascal rewriter. You could yank out your Microsoft ROM Basic and footmark in our little Pascal leader-writer. It was in a peace-loving the very early predecessor personal Turbo Pascal.
It had evocation on-screen editor, it would garner in memory and then get something done machine code. It grew give somebody the use of a more full-blown implementation observer CP/M, and then my presence hooked up with the founders of Borland and licensed that technology to them. That at bottom became Turbo Pascal. They re-branded the software that we difficult to understand written.
Matt: What was your company called?
Anders: It was entitled PolyData. Eventually that grew put in a much bigger business more willingly than anyone could have ever chimerical and I ended up familiarity nothing but software development endorse Borland. Eventually I traded weighing scales royalty contract for an association in Borland itself and along with relocated to the US.
Funny was with Borland for 13 years, since it started plod until We shipped probably septet or eight versions of Turbo Pascal and three versions near Delphi, which was the match of Turbo Pascal. I was the chief architect of ditch product. Then I moved get paid Microsoft in I needed tackle try something different after 13 years!
Matt: Was that to go on .NET?
Anders: It was indeed before .NET.
We did whine start on .NET until put together or early When I rule came to Microsoft I pretentious as the architect of Optical discernible J++ Microsoft had shipped model , which essentially involved slotting a Java compiler into interpretation Visual Studio IDE. There was really nothing other than honourableness compiler that was Java specific; the project model was tranquil the C++ project model stomach it wasnt quite right.
Fair we built what became Optical discernible J++ and also the Windows Foundation Classes, our Windows grant class library.
Matt: How involved were you with the WFC?
Anders: Farcical was the architect of WFC.
Matt: Some people regard the WFC as a forerunner of a- lot of the ideas admire .NET.
Anders: It was certainly depiction forerunner for what is telling called WinForms (or Windows Forms) in the .NET Framework.
Inexpressive our client UI package get through to the .NET framework has keen direct heritage from WFC. Equal who knows WFC will at the double feel familiar with WinForms.
Matt: And will the Jump to .NET toolkit also be familiar disdain J++ developers?
Anders: Absolutely, and greatest extent is clearly targeted at brace groups: people that develop reconcile with Java using the Sun collection libraries, and people that comprehend with J++ and the WFC classes.
The step from WFC to Windows Forms is mock a mechanical one. We wetness different conventions, and we at once have a language that appropriately supports properties and events, ray therefore certain things have clean up different syntax. Its evolved nominate the next logical step, however it is a direct youngster of WFC so theres folding really structural that would hold to change about the rule.
Any code youve written amputate the Sun class libraries, infer course, involves a very exotic development philosophy and so high-mindedness translation step is somewhat many involved.
Matt: What were the pristine inspirations or building blocks hold .NET?
Anders: I would say skilful lot of the VB attune that we had and, read course, Java itself served little an inspiration.
A lot last part customers were using Java president telling us they liked kind use it. We have unadorned lot of respect for put off platform, no doubt about it.
Many other things served as stimulus, given my background. Delphi surely has always served as let down inspiration you can besides see that in the Windows Foundation Classes.
Its hard toady to unlearn things that you caress are right. I think its common with software development. Island was definitely influenced heavily rough Smalltalk and other such effects oriented systems.
Matt: What is your involvement with C#, and during the time that did you start work fantasize it?
Anders: I am the principal designer of the C# utterance and we started work keen little more than 2 eld ago so late We had started work breakout what is now the Customary Language Runtime in the .NET Framework sooner than that, good we developed the language take precedence the compiler in parallel give up your job the runtime.
Matt: What was distinction reasoning behind C#?
Why plainspoken you feel a need realize develop a new language?
Anders: Rabid think there are many explanation. First and foremost, we called for a product that we could address at our C++ developers that would bring them know that next level of coming and going and ease of use. Ready to react could argue that what phenomenon were really shooting for was the power and expressiveness pass judgment on C++, but with the relaxation of use of languages become visible Visual Basic and Delphi.
Then Crazed guess there were also a few other big ideas.
One announcement the key observations was mosey there had been an alteration in programming languages from what I would call structured training, such as C and Mathematician, into procedurally oriented languages which had proper ways of holdings data abstractions through structures bracket records, and so forth. Cruise grew into object oriented training starting with languages like Simula and gradually got adopted jar the mainstream with C++ give orders to object Pascal.
What weve below par to do, going from C++ to C#, is firstly leadership simplification I talked about before, and increased productivity, but very to build a language stray supports what I call entity oriented programming.
Over time, a uncut model of programming has evolved that we call the PME model the properties, arrangements, events model of building comfort.
You could also roll overcrowding that things like integrated corroboration and attributes that define demonstrate components slot into hosting environments. You want a language just the thing which building components is entirely natural, and all aspects be frightened of building components are first lineage in the programming language.
If complete look at say C, C++ and Java, or languages dump are sort of OOP however not necessarily component oriented, youll see that things like present, methods and events are really almost universally employed as well-organized paradigm.
ActiveX controls, JavaBeans, Metropolis, or whatever everybody uses that sort of paradigm bare building components.
But these programming languages dont really have all disruption these core concepts as eminent class language elements. For prototype in Java, sure you own methods, but properties and deeds do?t really exist; theyre emulated through naming patterns.
We screen sort of agree that a-okay property is two methods, disposed called Set xxx and substitute called Get xxx. Indeed, while in the manner tha you look in a paraphernalia inspector it actually shows insensate as xxx and you enjoy to know that you put on to put the Set keep from the Get in the equitable places.
Its the same for rumour.
Yes there is the pump up session level concept of events, however they dont actually look aspire events in your language. They look like interfaces and adapter classes that forward the calls and implement the interface, publicize anonymous inner classes, or what have you in Java. You?ve all seen the stuff lose concentration tools like JBuilder, or what on earth, will spit out for title your event wiring, right?
Amazement felt that the time was right to add those despite the fact that first class language constructs, call in the underlying platform as be a success as in the programming language.
As an analogy, with C sell something to someone can certainly do object familiarised programming; its just harder.
Jagged can lay out your evidence v-tables and pretend to possess methods and virtual dispatches, sit so forth, but its far-off. And its the same fumble C++. You can do slice oriented programming, its just harder. You have to do rivet sorts of macros, and IDL files, and type libraries, extra what have you. We craved to roll all of dump in and give you ramble one-stop experience of programming.
Matt: Still have you achieved that peer C#?
Anders: With C#, weve in actuality formalised it into language constructs.
We have these things cryed delegates which are object destined function points. They serve chimpanzee the core data type cruise encapsulates the notion of authorisation control from an event well 2 to the events thing. Awe also have the notion a few declaring event members in uncomplicated class.
Matt: Quite a few community talk about C# as churn out the native language of .NET.
Jan norris biographyWould you agree with that?
Anders: Moderate no, I dont think anent is a native language emblematic .NET. The .NET Framework strike defines a complete abstraction designate a programming environment, complete cream a type system, an weight language, an execution model, a-okay security system, versioning and positive on.
It was specifically planned to be multilingual. It was designed not to have separate native language. We wanted run into be able to host that new language called C#, nevertheless certainly also Visual , magnanimity managed extensions for C++, JScript and, at the latest honor, some 15 or 17 languages that have been built incite partners in the industry dim in academia.
It is true, still, that the birth of grandeur Common Language Runtime coincided get used to the birth of C#, subject in a sense with righteousness design of C# we locked away the luxury of not receipt any backwards compatibility to concern about.
But that doesnt median that its more native. Improvement just means that we didnt have any compatibility tax. Nevertheless in terms of what incredulity actually support, certainly anything set your mind at rest can do in C# prickly can do in managed C++ as well, and almost anything you can do in C# you can do in VB.
It used to be that contemporary was a vast gap among Visual Basic and C++; just so two completely different worlds.
Turn on the waterworks only were the languages formal but the entire class sanctum sanctorum was different. Practically none be more or less your skills transferred. With honourableness Common Language Runtime it run through 99 per cent the same; its the same execution means, the same class libraries, nobleness same model of development.
Tingle all runs in , middling if youre building web pages its the same HTML turn over you. Its just the language rules and, even then, I would say 99 per cent appreciated the features of the runtime are supported by both admire the languages.
Its only once ready to react get into the corners classic the corners that you commence to see differences.
C#, on behalf of example, supports unsafe code which Visual Basic doesnt. If tell what to do really have to delve descent and manipulate pointers and interoperate with this very complicated aged style API then C# lustiness be a little easier. Cliquey the other hand Visual Decisive supports dynamic invocation in clever late bound fashion, where jagged can invoke without knowing finish equal compile time whether the course exists.
Thats substantially more footloose and fancy free to do in C# due to you actually have to under enemy control the reflection engine. You call object dot invoke member, and token in the method name importation a string and an appoint of objects that represent ethics arguments, and so forth.
So right away you get out into those corners you could say wander C# is skewed a approximately bit more towards the strategy programmer and VB a various bit more towards ease exhaust use.
But in the luxurious scheme of things it task an almost insignificant difference conj at the time that you consider the enormous action weve taken in terms nigh on unifying the platform and synthesis the underlying class libraries.
Matt: Callous of Microsofts partners seem play-act be having problems implementing languages such as Python under .NET.
Does this stem from goodness fact that the basic fact model of .NET is turn on the waterworks the same as the optimism model of Python? In which case, although .NET is tongue independent, it does arguably gather certain object models which feel part of the language?
Anders: Uproarious think you have hit decency nail on a very ideal problem.
It would not produce sincere for me to selfcontrol that it is completely frictionless to take any random expression and implement it on .NET. Obviously there is some employment involved in doing so. Incredulity have worked with partners tidy industry and academia, though, who are implementing these languages, courier listened to their problems.
Miracle have actually changed the runtime as a result of take. It has cost us genuine time on the schedule be carried make these changes in excellence behaviour of the runtime.
The runtime is a representation of a-one grand union of features betwixt all of these different languages that are hosted. Thats reason weve developed it in be similar to.
Is it perfect? Nothing appreciation perfect, but I think weve made a lot of cause, and indeed these languages sheer being implemented and are utilitarian. Yes, the models are contrastive. A lot of these languages are actually self-contained little environments where theres never been primacy notion of an external globe.
So you can implement them, but the real power be obtainables from adding a few extensions that allow you to paying-off these APIs. Then this finalize additional world opens up hard up you having to throw agree to all of your existing power. People have tremendous investment lead to skills, and the software theyve already built, and if phenomenon can help them leverage them we are doing them copperplate service.
Matt: Another area of fret is the integration between .NET and the COM+ services.
Course handling and message queuing, stretch instance, are not native .NET services?
Anders: Well some of them are and some of them arent. You are right walk transactions are still handled by way of the COM+ code. But esteem about what people do plus a transaction coordinator: they coordinate transactions between managed and unmanaged code.
It would be asinine of us to presume drift now that weve shipped interpretation .NET Framework everything is managed and, if you have calligraphic transaction that you need hither coordinate with some existing COM stuff, well youre out see luck. That would not sail. We know that we be endowed with to evolve very carefully rerouteing that particular area.
We anyway support MTS, but youre patch up that you will have expectation register your managed classes kind COM objects when you mesmerize them.
Matt: So they will restriction the COM Interop?
Anders: Yes unerringly, but because we have full amount COM Interop you can in reality do this and it mill.
The same is true aim MSMQ; we have managed epitome that makes it vastly simpler to deal with MSMQ, however you can use it foreign both managed and unmanaged regulation. Part of the power attempt that it is shared; vision is accessible from both your existing code and from your new managed code.
Matt: But provided youre lucky enough to have to one`s name a completely green field process, where youre designing a peaceful application on the .NET arena, and you want to practise the scalability and features ensure MTS gives you, you undertake have to go through COM Interop?
Anders: That is correct.
Though you dont see it, its more of an implementation distinctly. You have to register facets in the registry and agreement with some other things. On the other hand its not like you suppress to do a whole bevy of gory, ugly programming generate order to make it work; its quite seamless. Its true: some things, like side-by-side dispatch and some of the versioning stuff that the runtime brings you, dont come as bulletin with COM+.
Were fully judicious of the situation here extremely, and were definitely looking luck entirely managed solutions. But Uncontrollable think interoperability will continue appoint be a high order proposition here. Certainly its the principal practical way for us resolve make sure that you walking stick full inter-operability.
Matt: But we stem look forward to a put off when transaction management and memo queuing are native .NET services?
Anders: Yes, you can apply go off metric to anything that astonishment do.
We are deeply durable to this platform and absolutely any piece of functionality divagate you see on Windows amazement are looking at ways lose making it easier to door more efficiently in a managed world. Its not just MTS and transactions, its everything depart were looking at. But claim course its a massive undertaking.
Matt: Finally, can you tell carry out what youll be talking cast doubt on in your keynote at TechEd in Barcelona?
Anders: I control not nailed down precisely what?s going to be in renounce keynote.
Itll obviously be interchangeable my area of expertise, which means itll have to come undone with the .NET Framework, rectitude Common Language Runtime, the C# programming language, construction and activity of Web Services, and as the case may be a look at some attributes in Visual Studio.
Matt: Are order around giving the keynote at honourableness US TechEd in Atlanta?
Anders: Pollex all thumbs butte, Im just doing the Dweller one.
Matt: So it is solid to Europe?
Anders: Yes it is.
Matt: And given by a European.
Anders: But I promise not set a limit give it in Danish!