News for hackers. Stuff that matters.
Re:New functional language - C# by ynd on Monday June 23, 2008 @03:41AM (#224896)
Congratulations to the .Net team. C# - which started as a Java look-alike - has come a long way.
Re:New functional language - C# by mojuba on Monday June 23, 2008 @05:39AM (#224959)
As far as I can tell, the majority of C# programmers are either not aware of these features or don't know how to use it.

What stops me from praising C# is its ridiculous verbosity. A language in which the shortest possible form of a character array literal is

  new char[] {'a', 'b'}
is doomed to be low-end, low entry-level, low-respect language, despite all efforts to bring some high-end features into it.
Re:New functional language - C# by erictobia on Monday June 23, 2008 @07:49AM (#225030)
It's actually possible to write slightly less verbose code with C# 3.0. For example:

  //...

  char[] someChars = {'A', 'B', 'C'};

  var moreChars = new [] {'D', 'E', 'F'};

  SomeMethod(new[] { 'G', 'H', 'I' });

  //...
I do, however, agree with your sentiment. The language still has some aspects that are quite verbose when compared with dynamically typed languages. You are also right in pointing out that these new features are irrelevant if programmers are not taking advantage of them.
Re:New functional language - C# by mojuba on Monday June 23, 2008 @08:07AM (#225043)

  new [] {'D', 'E', 'F'}
I thought it was impossible at least in 2.x, is this something added in 3.0?
Re:New functional language - C# by erictobia on Monday June 23, 2008 @08:39AM (#225059)
You're right - it has been there since at least 2.0. I threw that in there as an example. I apologize for not clarifying that.
Re:New functional language - C# by jcromartie on Monday June 23, 2008 @10:25AM (#225129)
This is great for some C# developers, but I wonder how well it will be adopted. C# is mostly used for "enterprise" development. In my work I'm still using 2.0. Worse yet, some of my former coworkers are still using .NET 1.1 at their jobs.

Why must corporate development be so cumbersome? And more importantly, why doesn't this hinder C# where it seems to keep Java so far behind?

Re:New functional language - C# by mikkom on Monday June 23, 2008 @03:43AM (#224900)
Why can't Java people do something like this?

I really like what C# people are doing and the language starts to sound really good but unfortunately my work is done with java and *nix so C# is not an option.

Re:New functional language - C# by mojuba on Monday June 23, 2008 @08:19AM (#225053)
This article explains why: http://mindprod.com/jgloss/closure.html

Upd: just found an interesting discussion on the topic: http://www.artima.com/forums/flat.jsp?forum=106&thread=1...

Re:New functional language - C# by dshah on Sunday June 22, 2008 @10:48PM (#224642)
Cool.

Now, if only ASP.NET was "cleaner" and didn't have all that "event-driven" ugliness.

More widespread usage on Linux would help too. Mono just hasn't taken off in terms of mainstream production use.

Re:New functional language - C# by johns on Sunday June 22, 2008 @11:59PM (#224721)
Give ASP.NET MVC a try: http://www.asp.net/mvc/
Re:New functional language - C# by chrisbroadfoot on Sunday June 22, 2008 @10:49PM (#224646)
+1. I quite like C#, but it's not enough incentive for me to switch to Windows.
Re:New functional language - C# by cysh on Monday June 23, 2008 @09:38AM (#225092)
Re:New functional language - C# by jm4 on Monday June 23, 2008 @02:07PM (#225373)
The article is covering features in C# 3.0. Mono is perpetually playing catch up to Microsoft's implementation and according to the Mono site the "Mono API today is somewhere in between .NET 2.0 and .NET 3.5". Besides the fact that the language implementation is behind, developers also have to deal with the fact that the standard library isn't 100% compatible either. It seems pretty clear that C# developers that are not on Microsoft's implementation are basically second class citizens. I don't think Mono can be taken seriously if we're talking about being compatibility with Microsoft's implementation. It's not all bad, though. Mono seems to be a perfectly good platform when evaluated on its own.

That said, I have little experience with Microsoft .NET and Mono so these are the observations of someone only casually acquainted with either project. Can anyone here share any experiences with Mono?

Re:New functional language - C# by chrisbroadfoot on Monday June 23, 2008 @10:31PM (#225852)
Agreed. I personally think it's not the risk to put yet another layer in your stack that has the potential to royally fuck things up.
Re:New functional language - C# by culley on Sunday June 22, 2008 @09:50PM (#224589)
Yeah! Finally an excuse to do something interesting at work instead of at home.
Re:New functional language - C# by pavelludiq on Monday June 23, 2008 @09:21AM (#225082)