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."
Looks more like Delphi every release (Score:1, Interesting)
Re:Looks more like Delphi every release (Score:3, Interesting)
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.
Re:Looks more like Delphi every release (Score:5, Interesting)
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.
Can someone explain the advantages of C# over VB? (Score:1, Interesting)
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)
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)
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
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?
Re:The Microsoft Trap (Score:3, Interesting)
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
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)
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?
Microsoft May Have a Future (Score:3, Interesting)
Now, too bad management will keep on trying to tie
If only the
But no
Bashing MS is the whole point of this website... (Score:2, Interesting)
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
Re:Looks more like Delphi every release (Score:3, Interesting)
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'.
ECMA or Microsoft Standard? (Score:2, Interesting)
I have just one problem with it (Score:3, Interesting)
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
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.
Re:I have just one problem with it (Score:4, Interesting)
What forced upgrades are you referring to? I must be missing something here.
Intelligent design? (Score:2, Interesting)
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?)