Slashdot Mirror


Anders Hejlsberg Interviewed On C#

ghost. writes: "I'm sure it's been submitted already, but here's an O'Reilly interview with Anders Hejlsberg, Chief C# language architect for Microsoft (as well as the force behind Turbo Pascal and Delphi, in the past). While my interest in C# specifically is mild at best, I always seem to learn a lot when /. gets into a good discussion about programming and language design, and I'd enjoy reading everyone's insight based on what Hejlsberg had to say." It's a good read, too -- this interview brings to the fore some of the questions about openness that people raise about C#, and Hejlsberg has strong words about his new baby.

19 of 381 comments (clear)

  1. This guy gets around - by Mark+A.+Rhowe · · Score: 5

    Chief Architect of Delphi and His Team Designed WFC

    Good details on C# as described in The Register

  2. Visual Basic Inherently Save by waldoj · · Score: 4

    My favorite part:

    Osborn:
    So you can't write unsafe code in VB?
    Hejlsberg:
    No, you cannot.

    :)

    -Waldo
    -------------------

  3. C# ECMA Standardization by humpmonkey · · Score: 5

    Here is a link to minutes from a recent ECMA T39 meeting where they discuss the submission of C# and CLI.
    with humpy love,

    --
    with humpy love,
    humpmonkey
  4. Why C# is better... by donny · · Score: 5

    ... and I quote:

    "In C#, enums are not just integers. They're actually strongly typed value types that derive from System.Enum in the .NET base-class library."

    Wow! Now, next time I accidentally set the colour of my car to "Tuesday", the compiler will throw a hissy-fit at me! Hooray for C-#!

    Donny

  5. Open Source by BeIshmael · · Score: 4
    I think some of those comments were inspired by the initial version of the language reference that we provided to the public. Microsoft wrote it in Microsoft meetings in which we were thinking primarily in terms of Microsoft platforms. As a result, we make references to things like COM and DLLs in the spec when really a DLL is a specific case of the more general problem of how to invoke native code on a given platform. One of the benefits of going to a standards organization and working with people like IBM, with whom we worked on the SOAP specification, is that we ensure we don't make any such references that tie us or lock us into something like the COM framework in future versions of the specification.

    ...I think we've done a great job supporting COM on the .NET platform. But people in the industry have been reading too much into our use of the words COM and DLL. They conclude that the .NET platform is for Windows platforms only, and that's absolutely incorrect.

    People have read too much into the comments because of Microsoft's past actions. It would be really nice to think that they are fully supporting open standards for SOAP and C#. SOAP has tremendous potential. Reading this gives me some hope... Until I think about every Microsoft product's perverted implementation of standard.

    I feel like a guy who just met a pretty girl at the bar. I *know* I'm not going to get to take her home, but the **slightest chance** that it might happen has me buying drinks and listening to her every word all night.

  6. Only 9 Main Developers? by waldoj · · Score: 4

    Do y'all think this is for real? Hejlsberg says:

    The language design team consisted of four people. The compiler team had another five developers.

    Working with such a small team seems just too cool for Microsoft. To be fair, he says that the "the whole company" was involved with the framework. I think it's actually a good sign for C# that it was made with such a small team.

    -Waldo
    -------------------

  7. Microsoft Programmer Called As Defense Witness by Saint+Aardvark · · Score: 4
    MANILA (AP) -- In a surprise move, lawyers for the accused creator of the "I Love You" virus announced that they would be calling Microsoft programmer Anders Hejlsberg as an expert witness for the defense.

    "We will be presenting the judge and jury with a simple question," said attorney Rick Oxford. "Is it possible to write unsafe code in Visual Basic? Microsoft has already provided us with the answer: No."

    Oxford was referring to a recent interview with Hejlsberg published on www.oreilly.com. In it, the interviewer asked whether it was possible to write unsafe code in Visual Basic; Hejlsberg replied, "No, you cannot."

    US Attorney-General Janet Reno was flummoxed. "I'm flummoxed," she admitted. "That pretty much sinks our whole case right there. But you can be we'll make Gates pay for this." This comment sent Microsoft (NASDAQ: MSFT) share prices plummeting to 0-7/8 per share.

    Free Software Founation founder Richard M. Stallman was unavailable for comment. A spokeswoman said he was "busy buying Visual Basic For Dummies(tm)".

  8. This is so bogus... by KFury · · Score: 5
    Hejlsberg goes on and on saying:
    • This is not Java
    • We picked the best parts out of several languages, but mostly C++
    • We're incorporating new concepts to make a better language

    That's great, but his examples are stupid. Cases in point:

    "one of our key design goals was to make the C# language component-oriented, to add to the language itself all of the concepts that you need when you write components. Concepts such as properties, methods, events, attributes, and documentation are all first-class language constructs."

    Sure. That's new.

    "And C# is the first language to incorporate XML comment tags that can be used by the compiler to generate readable documentation directly from source code."

    So what? Ever heard of JavaDoc? POD? Having to code your comments in XML isn't a revolutionary leap (forward, anyhow).

    "One of the key differences between C# and these other languages, particularly Java, is that we tried to stay much closer to C++ in our design."
    -snip-
    "Another important concept is what I call "one-stop-shopping software." When you write code in C#, you write everything in one place. There is no need for header files, IDL files (Interface Definition Language), GUIDs and complicated interfaces."

    What?? First, C++ is the master of header files and interfaces. To write a language eliminating these is a good thing, but it's moving away from C++ and towards more modern languages like Java, not vice-versa. And even so, how can you say you're creating a highly component-ized language and then write everything in one place? OO-Pascal?

    The most annoying thing about this interview is Hejlsberg's stance that people should choose C# because "We're starting with a clean sheet of paper" building a language from scratch. This has been done several times, but too often the first thing that happens to that clean sheet of paper is that it gets marked up with the motives of the creating body, in this case, anti-Java, anti-interoperability Microsoft.

    Don't forget this is the same company that spearheaded the standardization of CSS, yet still fails to support the standard correctly in their browsers.

    I'd just as soon start using Dylan exclusively.

    Kevin Fox
    1. Re:This is so bogus... by KFury · · Score: 5

      Microsoft doesn't support the CSS standard correctly, just like they didn't support Java correctly.

      While more 'complete' than Netscape's CSS implementation, it's inconsistant, not only internally, but also across Mac and Windows platforms running the same version of IE. Regardless of other browsers, standards don't do the developer any good unless they are actually standard.

      Supporting evidence can be found here and here.

      Kevin Fox

  9. documentation by wishus · · Score: 4
    And C# is the first language to incorporate XML comment tags that can be used by the compiler to generate readable documentation directly from source code.

    So the compiler uses the tags to generate documentation? Cool.. I don't have to document anymore... I just put in a tag and let the compiler figure out what my code actually does.

    This will be a great debugging tool!

    wish
    ---

  10. Anders twisting James Gosling's word... by Rayban · · Score: 4

    Anders really twisted James Gosling's words here. He says, quoting James Gosling:

    ... There's a great interview with James Gosling on IBM's developer works site in which he directly addresses this issue. He said, yeah, the whole right-once-run-anywhere, 100%-pure-thing was a really goofy idea, and was more of a marketing thing. He says, in effect, "We didn't think we'd ever be able to deliver all that, and basically we haven't." Here's the inventor of the language saying that neither purity nor portability exists.

    And this is what James said:

    "The perfect goal of "write once, run anywhere, anything runs on anything" is just goofy. You're never going to run some piece of weather modeling software on a toaster [laughs]. And you wouldn't want to. So there are some scale and capability limits. But within that, you can do an awful lot to make sure that if somebody wants to read a file, it looks the same everywhere reading a file makes sense."

    This is clearly a misquote. Gosling is saying that a toaster can't run a weather simulation package (yes, that is goofy). There are physical limits to what you *can* run (ie: you can't run an app with a display requirement of 4000x2000 on a handheld PC with a display of 100x100, or one requiring 128MB on a 64Kb watch). Nothing here is really surprising - Java's strength is trying to hide the minor differences so that you don't need to worry about these while moving between platforms (even some platforms that vary wildly in terms of physical specifications).

    --
    æeee!
    1. Re:Anders twisting James Gosling's word... by jrimmer · · Score: 5

      Just for clarification and perhaps there's little difference between the two, but the Microsoft business lemming Goodhew screwed up the Gosling quote and not Anders.

  11. This isn't about VBScript! by Space+Cow · · Score: 5

    Just to clear things up about the above (out of context) quote. He isn't saying you can't write a macro virus in VBScript. He is saying you cannot obtain an unsafe pointer and crash the system.
    This will probably be moderated down as (obvious -1), but people are already responding with posts about VBScript kiddies etc...

  12. MICROSOFT HAVE FINALLY GOT IT! by happystink · · Score: 4
    Okay, I was as skeptical as all of you when I saw this, but check it out:

    Who's helping COBOL programmers today? Who's taking them to the Web? Only on the .NET platform can you embed Fujitsu COBOL in an ASP page. I mean it's truly revolutionary.

    THANK GOD! This truly is revolutionary! Yay Microsoft, you have finally made the web usable for the 1970s. I, and half a dozen COBOL programmers who couldn't really get INTO asp until now, thank you.

    :D

    sig:

    --

    sig:
    See the "..for smart people" banners Wired runs here? Look elsewhere guys.

  13. Level of honesty displayed by Chops · · Score: 4
    Here's a quote from Goodhew:
    This notion that Java is 100% pure and gives you 100% portability just isn't true. There's a great interview with James Gosling on IBM's developer works site in which he directly addresses this issue. He said, yeah, the whole right-once-run-anywhere, 100%-pure-thing was a really goofy idea, and was more of a marketing thing. He says, in effect, "We didn't think we'd ever be able to deliver all that, and basically we haven't." Here's the inventor of the language saying that neither purity nor portability exists.
    And here's the quote he seems to be referring to, with plenty of context and not "in effect:"
    Gosling: Well, that's really what all of Java is -- a glue layer that tries to make "write once, run everywhere" as close to true as it can be. The usual places where there are hard problems that you really can't get around are things like cell phones -- a cell phone doesn't have a mouse. Although some of them do -- they have little joystick mice.

    developerWorks: So while you're driving, you can be mousing around.

    Gosling: Yeah, actually a bunch of the Japanese I-phones have mice on them. It's a little joystick, you just steer the mouse around, and you push down harder to click the mouse. You can dial a phone that way. Those mice usually feel kind of hokey, although they're the only ones that really work for doing games.

    Not everything is a point of sale terminal, not everything is doing real-time stuff, not everything has a television tuner on it. There are all these APIs for environmental things, and they're going to be there, or they're not going to be there. We can do an awful lot to try to make devices as equivalent as possible and situations as equivalent as possible.

    There are some things that it's impossible to paper over, like the fact that your screen is only 100 pixels on a side; it is what it is. You can do all kinds of stuff with transformation matrices to scale things down, anti-aliasing, but if you take a great big screen and scale it down to 100x100, what you end up with is a bunch of mush. The underlying application really has to know something about the resolution of the screen. That kind of difference from place to place is pretty much unavoidable.

    Other kinds of differences, like what kind of CPU you've got, what kind of network connectivity you've got (as long as you've got network connectivity), anything that you can make look equivalent, we've worked really hard to make it look equivalent. It makes the transportability of software a whole lot easier.

    The perfect goal of "write once, run anywhere, anything runs on anything" is just goofy. You're never going to run some piece of weather modeling software on a toaster [laughs]. And you wouldn't want to. So there are some scale and capability limits. But within that, you can do an awful lot to make sure that if somebody wants to read a file, it looks the same everywhere reading a file makes sense.

    It's sort of like cars. They all have steering wheels. It's not like you get into some cars and they have steering wheels, and some cars have joysticks, and some cars have foot pedals. That kind of situation, which did actually once exist, was goofy. So things have gotten a lot easier.

    In other words, Goodhew is lying to make Java look bad. I find the use of "in effect" to enclose Goodhew's misleading summary in quotations, as if it was a direct quote from Gosling, particularly disgusting.
  14. Re:Anders Hejlsberg != Microsoft ? by GeorgeH · · Score: 5

    $ lynx -dump http://windows.oreilly.com/news/hejlsberg_0800.htm l | grep innovat | wc -l
    8
    $
    --

    --
    Why can't I moderate something "Wrong" or at least "Grossly Misinformed"?
  15. Lemme just pick this appart... by ameoba · · Score: 4

    One of the key differences between C# and .... Java, is that we tried to stay much closer to C++ in our design
    I was under the impression that one of Java's big strengths was that it didn't stick too closely to C++, and actually had a coherent, consistant design.

    Why are there no enums in Java, for example?
    Granted, having type-safe enums would be nice; but is this really a big enough flaw to design a language around?

    one of our key design goals was to make the C# language component-oriented
    Great... they're making it easier for us to write stuff to sell to those VB guys...

    C# is the first language to incorporate XML comment tags
    OOOER!!! XML tags. I'm glad Microsoft has decided that it's time to follow the industry standard hype. {MumbleMumbleJavaDocMumbleMumble}

    Developers are building software components these days. They're not building monolithic applications or monolithic class libraries.
    trans: Why bother writing decent software, when some schmuck who's never heard of a linked list can do it in less than half the time with VB (and nobody'll notice the difference)? Might as well accept that, and sell him the bits he uses to do it with.

    We focused hard on giving programmers all of the right solutions for interoperating with Internet standards, such as HTTP, HTML, XML, and with existing Microsoft technologies
    Well, what else do you need? HTTP, HTML, XML and M$? I should have figured that out a long time ago, and just taken UDP out of my TCP/IP stack altogether.

    . Unsafe code allows you to write inline C code with pointers ... to pin down memory so it won't accidentally be garbage-collected.
    If you need to write unsafe code to ensure that things don't get "accidentally garbage-collected" either the GC is worthless, or you're failing to fully utilize the paradigm.
    people seem to think we're on drugs or something. I think it's a misunderstanding
    Yes... the guys at Berkely were doing drugs when they wrote BSD. They guys at M$ are obviously too sober to put ideals over profit.

    Only on the .NET platform can you embed Fujitsu COBOL in an ASP page. I mean it's truly revolutionary.
    The only revolution I want to involving COBOL very closely resembles the French revolution. Guilotines and all.

    with C# we were able to start with a clean sheet of paper
    Hrmm... earlier they were talking about how it stayed closer to C++ than Java did; now it's a "clean sheet of paper". I really wish they could make up their mind.

    The unification of programming models, which the .NET framework offers. ...we always seemed to end up marrying a programming language to a particular API and a particular form of programming.
    So, they've learned the error of their ways, and have decided to bring the new unified APIs into the world with a new language?

    one of the key differences between our IL design and Java byte code ...is that we made the decision up-front to not have interpreters. Our code will always run native
    And this is important how? Are they saying you can't run it interpreted? Anyways, I'd like to see a JIT compiler do better than the Hotspot model (interpretation + realtime profiling to find sections of code to compile to native code).

    you can name your source files anything you want.
    For some reason they seem to think this is important. I fail to see it. Skinable filenames?

    I think developers will find the release of Visual Studio .Net to be one of the highest quality releases in Microsoft's history
    It's a little late for them to start worrying about quality now; they're getting their asses Ma-Belled.

    --
    my sig's at the bottom of the page.
  16. Re:Why Another One? by Frymaster · · Score: 4
    We already have anough C's. What do you think?

    I think lots about this, really, truly:
    1. Too many languages? No. Too many C's? maybe. People keep going back to C as the lingua franca so there has to be something to it. If you're going to come up with a new language, sticking to C roots may be the best way to ensure durability.
    2. Languages will have to become more spcialized as time progresses and the complexity and scale of computing tasks grow. The future I see in my crystal ball (written in C, btw) are languages devoted to specific tasks such as cgi, game development etc. In a lot of ways this is a throw back to the early days of Fortran, Lisp and Cobol which were non-general languages. There weren't really the issues of scale and complexity back then though that we face now, so it was fairly easy for C to sweep them under the rug.
    3. Future specialized languages will almost assuredly be themselves written in c. I'm not talking about yacc-hacks but honest-to-god interpreted or even compiled languages. What this means, though, is that in a future with fragmented languages used for specialized purposes, people looking to expand their power and control will look back to the source of those languages construction which leads to point 4.
    4. Which is the same as point 1. People keep going back to the lingua franca.... so future specialized languages should stick closely to C while maintaining all the neat features that make them specialized in the first place...

    Was that a bit scattered? Sorry, it's clearly organized in my head, but I haven't gotten around to scribbling out the boxes and arrows yet...

  17. "unsafe" is a matter of implementation by TheDullBlade · · Score: 4

    You could write a C compiler that had safe pointers. It would generate significantly slower code, but it could be done quite easily. You just treat all memory as bounded arrays, and each pointer as having an array and an index. If the index is outside of the range when you attempt to access the pointer, you get a fatal error. Simple.

    I'm still disappointed that nobody seems to have come out with a universal sandbox that isn't tied to any system or language. Emulation of real-world systems is very complex (and therefore hard to optimize and debug), and if you put in mandatory features like garbage collection in the Java runtime, it's very hard to write compilers for certain languages.

    BTW, I think calling it C# is a cheap stunt that will just add to name confusion. C is all about pointers, if pointers are frowned on as "unsafe", rather than the default way of doing things, it's not C.

    ---
    Despite rumors to the contrary, I am not a turnip.

    --
    /.