News for hackers. Stuff that matters.
Re:Microsoft takes .NET open source and cross-platform by SCHiM on Wednesday November 12, 2014 @01:12PM (#8597113)
You know what I also really like about C# is the .net runtime. I know that allot of people dislike it because there's so much leftover stuff from previous versions, however despite this it's one of the most comprehensive runtimes I've every worked with.

Want to make a screenshot of the desktop? Got it. Want to post keystrokes to another application? No problem. Ohh I see you want to write a tcp server with asynchronous processing? Here's some generics you can just c&p.

I know other languages have these features too, but C# makes it so damn easy to use in the stdlib it's just not funny anymore.

Re:Microsoft takes .NET open source and cross-platform by eyko on Wednesday November 12, 2014 @02:38PM (#8597653)
> Ohh I see you want to write a tcp server with asynchronous processing? Here's some generics you can just c&p.

So we've come to the point where copy-pasteability is a language feature? Tell me I can use a library or module. Tell me that the language comes with built in features to help me do this or that. But never tell me I can copy-paste generic code. Please.

Re:Microsoft takes .NET open source and cross-platform by mattmanser on Wednesday November 12, 2014 @04:08PM (#8598188)
That's actually one of the features of C#, if something is needed or is hot in another language, it will appear in the core libraries.

They've realised recently this is having a negative effect on open source C# code as so much of the community waits for the "offical" version, but it has its positives too, almost anything you want to do is in the core libraries.

Re:Microsoft takes .NET open source and cross-platform by EdwardDiego on Wednesday November 12, 2014 @07:49PM (#8599348)
This is my main grudge with .NET development, a culture of preferring The One True Way. It (among other things) leads to a lack of .NET FOSS diversity.
Re:Microsoft takes .NET open source and cross-platform by Pxtl on Wednesday November 12, 2014 @10:54PM (#8599818)
The biggest problem with this culture is that it means that when the One True Way is wrong, we suck it up and use it anyways.

I mean, Entity Framework is great, WebAPI is slick, and MVC has its moments, but there are some real trainswrecks. I've used all three XML serializers in the .NET framework and they're all cringeworthy. ASP.Net WebForms could have been something spectacular with open development instead of the hideous monstrosity it was. And MSBuild would have been laughed out of the room and regarded as some kind of bizarre eccentricity like TempleOS or UrBit instead of a serious build system.

Re:Microsoft takes .NET open source and cross-platform by koyote on Thursday November 13, 2014 @07:49AM (#8601234)
>I've used all three XML serializers in the .NET framework and they're all cringeworthy.

XmlSerializer, DataContractSerializer, and what is the third? I agree and was about to point out the same thing though; XML serializers in .NET are a joke but because they exist in the core libraries there is not really a compelling open source alternative.

That being said, it seems like the Asp.Net Web API is actually using Json.Net instead of the built-in serializer.

Re:Microsoft takes .NET open source and cross-platform by Pxtl on Thursday November 13, 2014 @09:39AM (#8601681)
XamlServices serializer. Technically it serializes Xaml, but afaik it can be prodded to produce vanilla XML.
Re:Microsoft takes .NET open source and cross-platform by Paradigma11 on Thursday November 13, 2014 @07:25AM (#8601151)
Dont mock msbuild.

i never slept as much or as well than when i tried to work through the documentation.

Re:Microsoft takes .NET open source and cross-platform by glifchits on Wednesday November 12, 2014 @08:48PM (#8599516)
Generic code is made to be copy-pasted. Also, what's wrong with copy-pasting when it lets you write features faster?
Re:Microsoft takes .NET open source and cross-platform by StavrosK on Wednesday November 12, 2014 @10:47PM (#8599798)
It's a code smell that usually means there's something there to be abstracted, or that your API isn't as clean as it could be.
Re:Microsoft takes .NET open source and cross-platform by codeulike on Thursday November 13, 2014 @04:31PM (#8604251)
I'd take a bit of copy-paste over premature generalisation any day.
Re:Microsoft takes .NET open source and cross-platform by StavrosK on Thursday November 13, 2014 @04:45PM (#8604340)
I'd take a premature generalisation over a false dichotomy.
Re:Microsoft takes .NET open source and cross-platform by codeulike on Friday November 14, 2014 @04:14AM (#8606377)
So if its not a dichotomy, what are the other options? If you want to avoid copy/paste, you have to use generalisation techniques.
Re:Microsoft takes .NET open source and cross-platform by StavrosK on Friday November 14, 2014 @05:42AM (#8606550)
Yes, and generalisation doesn't mean premature generalisation. It's very possible to just have a well-designed generalisation.
Re:Microsoft takes .NET open source and cross-platform by codeulike on Friday November 14, 2014 @07:12AM (#8606744)
Well OK. But in a lot of cases I see badly designed over complex generalisations ("premature generalisation") because of a phobia of copy/paste. A bit of copy/paste is OK guys, seriously. Wait and see how it goes for a bit and then refactor the general case in later _if_ it seems worth it.