Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Microsoft

Anders Hejlsberg on C# 3.0 386

spongman writes "Channel9 has a video of Anders Hejlsberg demoing C# 3.0. The new language enhancements include implicitly typed locals, extension methods, strongly-typed lambda expressions, anonymous types, and LINQ - a builtin SQL-like syntax for data access. The spec, samples and a working compiler can be found on MSDN."
This discussion has been archived. No new comments can be posted.

Anders Hejlsberg on C# 3.0

Comments Filter:
  • by dr3vil ( 604180 ) on Sunday September 18, 2005 @08:01AM (#13588940)
    But then, Bill Gates himself said that the only thing wrong with Delphi was that it wasn't a Microsoft product.
  • by Decaff ( 42676 ) on Sunday September 18, 2005 @08:23AM (#13588998)
    LINQ, and DLINQ, are very exciting improvements in removing the disconnect between the database and the middle/front tier, and given the tremendous importance of that it will be remarkable.

    On the contrary, it is big step backwards. One area of intensive research in IT for years is setting up a portable high-performance disconnect between database and other tiers. For many applications the database is just a resource, and embedding query languages within code is a bad idea. If you look at transparent persistence systems like JDO and Hibernate, almost all of the data retrieval and processing can be done with no query language at all - optimised query languages tailored for specific databases can be generated in the background, and this querying can be very optimised indeed.

    Embedded SQL in computer languages has been around for a very long time - take a look at SQL/J. There are more elegant ways to do things.

    Also, I can't believe that MS C# is going to include support for MySQL, Postgresql etc, like Hibernate, NHibernate, JDO etc.
  • by ergo98 ( 9391 ) on Sunday September 18, 2005 @08:30AM (#13589024) Homepage Journal
    One area of intensive research in IT for years is setting up a portable high-performance disconnect between database and other tiers.

    It is high-performance. Watch the demo - at one point Anders sets up a log, and you can see that the LINQ query was transformed into the appropriate, performant T-SQL which is passed to the RDBMS. It isn't doing the standard, shittacular "pull everything back in a terribly unscalable manner and then filter it in the middle tier", but rather appears to be analyzing the whole of the query and communicating it effectively to the source.

    Embedded SQL in computer languages has been around for a very long time

    It isn't embedded SQL. It's set operations that obviously share commonalities with SQL, but are largely different. Again, have you watched the video or read the spec? DLINQ, by the way, is the ORM system that makes the objectpersistence "transparent" (leaky abstraction, like all ORMs, but still).

    Also, I can't believe that MS C# is going to include support for MySQL, Postgresql etc, like Hibernate, NHibernate, JDO etc.

    I doubt it'll include support either, out of the box. Instead, like always, they've created a generalized data services layer that any provider can plug into - create a ADO.NET 3.0 data provider for MySQL, and your data service can be the target of LINQ operations.
  • by FlorianMueller ( 801981 ) on Sunday September 18, 2005 @08:52AM (#13589066) Homepage
    This is a real question, not a rhetorical one, no matter how provocative it may seem.

    What really are the benefits that a developer gets by using C# instead of VB.NET? Either way, it's a vendor and platform lock-in, so there isn't really a portability gain. In terms of performance, the tests that I've read about haven't really shown a major advantage in favor of C#. As for functionality, C# was ahead of VB.NET in .NET 1.x, but in .NET 2.0, VB.NET has closed the gap by also allowing unsigned integers, custom operators etc.

    I personally tried both, and I'm much more productive with VB.NET because I get clear keywords such as LOOP and END IF instead of braces. Theoretically, I could add comments to a brace that indicate what type of structure ends at the respective point, but that's a waste of time, and if I modify an algorithm, then the function of those closing braces may change. Also, the VB.NET editor's auto-completion feature is more advanced.

    I'd really be interested in knowing other advantages that C# has, which is why I'm asking. So far it seems to me that some may be more familiar with a Java/C-style syntax (in which case I'm wondering why they don't go right for C++ or Java). Another reason may be that some people have this view that "real men don't program in BASIC".

  • Re:LINQ (Score:3, Interesting)

    by RAMMS+EIN ( 578166 ) on Sunday September 18, 2005 @08:52AM (#13589067) Homepage Journal
    ``The built in SQL like language would be usefull in many languages.''

    Yep. If done right, it can completely eliminate the possibility of SQL injections. This is something that too few people realize, but with SQL injections being a very common kind of vulnerability, it's definitely worth putting some thought and effort in.
  • The Microsoft Trap (Score:5, Interesting)

    by MrSteveSD ( 801820 ) on Sunday September 18, 2005 @08:55AM (#13589070)
    C# is a nice language, but the problem is I just don't trust Microsoft anymore. From a business perspective sticking with Microsoft has proven to be a mistake.

    I work for a software house in London and we have a large VB6 application that has been built up over many years. VB6 has effectively been dumped by Microsoft, so our application is slowly rotting away. There is absolutely no way we can rewrite it in C# or VB.Net, we just don't have the resources. I suggested that we at least write all new components in C# and use interop, but that turned out to be a real pain, especially when trying to debug.

    So what do we do? Spend a fortune rewriting our product in C# while our competitors (who may be using Java) continue to improve their products. And once we have eventually finished the rewrite, will Microsoft just dump .NET and move on to something else?

    I have to wonder. If there had been a number of VB6 vendors, rather than just Microsoft, they could never have dumped VB6. In that situation we would have all just moved over to another vendor.

    Is anyone else here in a similar situation?
  • by the eric conspiracy ( 20178 ) on Sunday September 18, 2005 @09:38AM (#13589211)
    Is anyone else here in a similar situation?

    Yes, we had a similar problem, made even worse by the fact we needed something that could scale a lot better than VB does.

    The solution for us was to move to Java. Fortunately our company is growing at a resonably rapid rate so that we were able to adsorb the VB programmers who for one reason or another didn't want to move to Java into some other role.

    We still have a few older customers running the old VB6 application but by end of next year they will all be moved over to Java.

    I see all this .Net hype, and rapid changes/feature addtions to the language and laugh. MS is leading you down the garden path, and in 5 years MS will be coming out with .New and you will be screwed again.

    Don't EVER forget that MS is a pure software company, and that means they MUST continue to sell new versions / churn their customer base to stay in business.

  • Language Bloat? (Score:4, Interesting)

    by Xepo ( 69222 ) on Sunday September 18, 2005 @09:46AM (#13589239) Homepage
    They keep adding more and more stuff to the language...is there anyone that can really read all of the code that is possible to be written in C#? It sounds like a readability nightmare to me.

    Heck, it took me years to learn all of the components in C++, and I'd bet that the specification for the complete language is now much smaller than C#'s. And there's still stuff waiting to be discovered on the level of template meta-programming.

    Is all of the stuff they keep adding actually useful? Or is it just being added so that they can give the impression of progress, and maybe convert more people to using it? Granted, I'm excited about C++0x, but unlike what I would be thinking if I used C#, I'm not worried because I trust the standards body to not put completely unnecessary stuff into the language. What do you C# programmers think?
  • by alucinor ( 849600 ) on Sunday September 18, 2005 @09:46AM (#13589241) Journal
    Thanks to some of the brilliant developers at MS, we can get some awesome stuff out of this company, like C#.

    Now, too bad management will keep on trying to tie .NET down to their sinking ship, Windows.

    If only the .NET framework could be freed from Windows, and given the official blessing to target all platforms, including Linux, then Microsoft could set itself up as the supreme tools vendor for the platform. It'd be a bright future for MS, and overnight .NET would probably become the de facto standard for development on Linux!

    But no ... the stodgy petrified boys up top will always put Windows first ... to MS's undoing, no doubt.
  • by bigweenie ( 73456 ) on Sunday September 18, 2005 @09:56AM (#13589268)

    Are you a newbie? That is the whole point of this website.

    If you don't want to bash MS, then go to some MScentric site and wax wonderful about their propietary crapola. Some that are on the MS payroll continue to espouse the virtues of MS here (perhaps you?!), but we all enjoy how much time, money and effort MS spends trying to alter the overall message of slashdot.org.

    Lesson for MS to learn: FUD doesn't effect a community of a single mind and purpose.

    C# will not replace Java. It is a wonderful Java knock-off with a great IDE (Visual Studio), but it is not a Java killer.

    End of rant.

    /bigweenie

  • by Decaff ( 42676 ) on Sunday September 18, 2005 @10:12AM (#13589325)
    "Embedded SQL in computer languages has been around for a very long time"

    It isn't embedded SQL. It's set operations that obviously share commonalities with SQL, but are largely different.


    I should have said 'embedded query languages'. My point stands... this is new.

    Again, have you watched the video or read the spec?

    Yes.

    DLINQ, by the way, is the ORM system that makes the objectpersistence "transparent" (leaky abstraction, like all ORMs, but still).

    Nowhere in the information can I find terms such as 'persistence by reachability' which are appropriate for true transparent persistence. I may be wrong, but it looks like true transparency is not supported.

    I doubt it'll include support either, out of the box. Instead, like always, they've created a generalized data services layer that any provider can plug into - create a ADO.NET 3.0 data provider for MySQL, and your data service can be the target of LINQ operations.

    There are plenty of alternatives for other languages that do support these database 'out of the box'.
  • by Anonymous Coward on Sunday September 18, 2005 @11:02AM (#13589501)
    What gives Microsoft the right to unilaterally update the ECMA C# standard? Unless the whole ECMA standard thing was just a farce all along.
  • by alexo ( 9335 ) on Sunday September 18, 2005 @12:05PM (#13589780) Journal

    The problem is that MS strongly ties the language with the IDE.

    That is, whenever C# (or Visual [anything] for that matter) gets new features, we have to buy a new version of Visual Studio to take advantage of it.

    For every developer that may work on a project that will use these new features (and our developers tend to move around).

    I have run into several annoying bugs and limitations in the .NET framework 1.1 and MS's response has invariably been "it is fixed in 2.0". However, to use it, we will have to buy VS 2005. Want a bug fix? Buy the new version! Neat.
    Now C# 3.0 comes along. Will we have to upgrade to VS 200x yet again?

    With these forced upgrades, MS has effectively implemented a subscription model for their software.
  • by caseih ( 160668 ) on Sunday September 18, 2005 @01:51PM (#13590185)
    What are you talking about? The .NET environment and C# environment has always been available as a separate, free download from MSDN. While developing in Visual Studio is nice, you absolutely don't have to. The compiler is a standalone commandline compiler and the runtime environment certainly doesn't have anything to do with Visual Studio. The Mono developers regularly download the latest versions of .NET to compile their test suites and compare the results to Mono's results.

    What forced upgrades are you referring to? I must be missing something here.
  • Intelligent design? (Score:2, Interesting)

    by pammon ( 831694 ) on Sunday September 18, 2005 @03:03PM (#13590556)

    Rather than allowing C# to evolve naturally, Microsoft is hoping that they can get people to buy into its intelligent design

    Seriously, I've never seen anyone try to evolve a production language this quickly. They're throwing in features left and right. It's exciting! But it's also terrifying: I feel like C# is being driven at breakneck speed towards, err... I don't think Microsoft actually HAS any ultimate goal in mind for C#, as long as they can cover a lot of ground getting there.

    And if you drive this fast, eventually you're going to crash, and when C# does, it will fragment into dozens of small shiny sublanguages. People will carve out their C# comfort zones containing the features they feel comfortable with and exclude the rest. Two C# programmers will no longer always speak the same "dialect," making it difficult understand each others' code.

    The fact that there's a great deal of overlap among C#'s features only makes this worse. Programmer A's heavy use of generics and lambda expressions will be unfamiliar to programmer B, who never bothered to learn those features since he can accomplish the same things using implicit typing and LINQ.

    And, needless to say, differing levels of compiler support will also exacerbate this problem.

    I'm surprised Microsoft isn't more careful, given the cautionary example of C++. C++ is in the later stages of this disease. Large projects have to specify the C++ sublanguage dialect that they're using [mozilla.org]. And we aren't talking simple style guidelines, but the excision of large chunks of features, like RTTI and exceptions. If C# continues the way it's going, it will wind up like this.

    ding! That was the sound of me reaching my metaphor limit of three per post. I guess I better end this. So to sum up:

    Microsoft, you are the largest software developer and in control of the OS and development tools. You are in the unique position of being able to dictate every aspect of a new programming language. It will be used for years to come by millions of developers in all different situations. This is a blessing and a tremendous opportunity.

    Don't fuck it up.

    (please?)

An Ada exception is when a routine gets in trouble and says 'Beam me up, Scotty'.

Working...