Live data from Hacker News

Microsoft takes .NET open source and cross-platform

news.microsoft.com

351–360 of 937 posts

Re: Microsoft takes .NET open source and cross-platform

#352
post #331
post #297

Earlier quoted context omitted.

Probably because, A), it was an uncalled-for digression into language wars, and B), now that we're here anyways, a lot of us think the majority of features in scala and Haskell for that matter are fundamentally misguided. My goal is not to write elegant code, but to write the least complex code with the lowest cognitive overhead. TCO, 10x the man-hours in maintenance and all that. If the choice is between having to w…

> If the choice is between having to write null-checks or having to understand category theory to read my code Me too. Luckily this is a false dichotomy.

Here's a random line from the Scala standard collections library:

def :+[B >: A, That](elem: B)(implicit bf: CanBuildFrom[Repr, B, That]): That

This is from the standard collections library.

In Java, I've got a List.add function. In case it's not clear from the name, 'add', I can click through to the implementation and it's pretty obvious what's happening.

In Scala, I've got +, ++, +:, :+, and a bunch of other nonsensical bullshit, and when I click through to the implementation? Even less sense. Whenever I use a standard scala collection, I have no idea what it's actually doing. Additionally, everything favors allocation-happy overly-clever immutable wrappers rather than a simple ArrayList which will smoke those immutable implementations in real-world performance.

The cure is far worse than the disease, here.

Re: Microsoft takes .NET open source and cross-platform

#353
post #235

Earlier quoted context omitted.

C# as a language is better than Java, but not as good as Scala.

In Scala, there are just too many ways to do things. It's optimized for flexibility and easy writability. C# on the other hand may be a little more verbose, but at least everyone can read everyone elses code.

IMHO this works to Scala's detriment. I very much enjoy Python and Clojure precisely because they have one, generally accepted way of doing things. Is it a silver bullet? Of course not, but this works for me 9 times out 10 and I find that coming back to my code later (or sharing with colleagues) is far easier because most code will be structured in a familiar way and therefore take less time to understand the unique bits that solve the problem at hand.

Re: Microsoft takes .NET open source and cross-platform

#355
post #327

Earlier quoted context omitted.

What languages have you got experience with that you feel C# is the best language you have worked with? And what makes it such a good language for you?

Generics, Partial Classes, awesome Reflection API, Lambda syntax, LINQ, C/C++ compatibility, async/await, concurrency primitives, etc. I have worked with prettier languages, for instance I have picked up Haskell recently, I have also worked with faster languages, C was my forte for many years and I have worked with languages in the GSD category like Ruby and Python. C# is appealing not because of some feature that it…

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

#356

Earlier quoted context omitted.

C# as a language is better than Java, but not as good as Scala.

As someone who has written applications in C#, Java and Scala (amongst others). I'd be curious as what makes you think Scala is a winner relative to C#?

I'd happily switch from Scala to F# but I would miss higher kinds and using implicits for typeclasses.

Re: Microsoft takes .NET open source and cross-platform

#357
This is huge.

A few months ago, we decided to write a big new software component at $work, basically a service layer that is going to accumulate lots of business logic. We discussed several programming languages, and thought that a statically typed language might be a good fit (we mostly did perl and python so far). C# was dismissed pretty quickly, because .Net was closed source, and Mono had the reputation of being a bit second rate (possibly not well-founded, but also hard to debunk for somebody not in the community).

I mentioned that Roslyn was also open source, but it was hard to convince anybody when the "main" implementation was still closed source (and we're very much an open + linux shop).

If this had come a year earlier, we might have picked C#. Maybe there'll be another project here in a few years...

Re: Microsoft takes .NET open source and cross-platform

#358
post #303

Earlier quoted context omitted.

You find C# harder than this? trait SeqLike[+A, +Repr] extends Any with IterableLike[A, Repr] with GenSeqLike[A, Repr] with Parallelizable[A, ParSeq[A]] { self => or def :+[B >: A, That](elem: B)(implicit bf: CanBuildFrom[Repr, B, That]): That

You intentionally chose code that is hard to read...I could easily do the same with C#. It isn't representative of the vast majority of the code that I use nor write. That being said, when you understand the nuances of type annotations, that code is quite readable in the mathematical notation sense. It is concise and takes more time per byte to understand, but it tells me enough about the code that I rarely have to r…

It's from the standard collections library, the most-used code in any language.

It is in fact representative of the vast majority of code you use.

The fact that it wasn't immediately clear to you that a lot of your code DOES use this code is probably the strongest argument I could make.

Re: Microsoft takes .NET open source and cross-platform

#359

Earlier quoted context omitted.

The thing is, it's anything but shitty. C# is one of the best languages out there for generic enterprise work and app development, and there's a magnigicent next gen language in F# thrown in, and a great web framework.

"C# is one of the best languages out there for generic enterprise work and app development" - i see you have great tools if cs is soooo good.

For enterprise work I'd actually agree that nothing beats C#.

I also love Haskell, but let's be honest - it won't get me hired, or at least not here in Bulgaria.

Re: Microsoft takes .NET open source and cross-platform

#360

Potentially great news for Unity game developers. Unity uses an ancient version of Mono that doesn't support all sorts of sensible things. Maybe now some future version of Unity will have a more cutting edge .NET library.

Unity has been developing their own runtime for a while now to get away from the mono licensing costs of using a new version. I'll be interested to see how they react to this turn of events.
Post reply on HN