Live data from Hacker News

6 Months with C#

ruoyusun.com

61–70 of 84 posts

Re: 6 Months with C#

#61
post #29

Earlier quoted context omitted.

No one wants to spend their life configuring servers. That's why tools like Chef and Puppet exist -- so you can write code that will do it for you. They just don't work as well for Windows as they do for Linux. After a significant amount of experience in the .NET ecosystem, I believe the majority of the anti-Microsoft sentiment is well-deserved. At one point, there was a lot of innovation in .NET OSS, but it seems to…

I keep hearing that there are better options... but I haven't found one which is personally better for me. I'd love to hear suggestions if you have the time. I think the biggest problem for me isn't some attachment to Windows Server (I much prefer working on a Linux server), or some misplaced love for WebForms (ick!), but the C# language in general. There are a lot of great dynamic language setups on Linux (Rails, va…

I don't think there is another great option if you want something like C# and you don't want to go down the Java road.

I adore C# as a language, and the CLR as a platform. If not for the Windows requirement, I would write quite a bit more C# than I do now. (See my other comments on why Mono isn't good enough as a platform-independent option.)

Let's be honest, JavaScript is a goofy language with all sorts of ugly parts, but it's surging in popularity because of the power of the platforms on which it's used (browsers and Node.js).

Lua is another language which I've taken a liking to recently. It has a beautiful, clean, simple syntax -- it's basically like dynamic C -- but its standard library is horribly weak. That's why I think it's relegated to embedding.

The .NET standard library is amazingly powerful, but the only "real" implementation of it requires Windows. My point is: it's not enough to be a good language, you need strong platform support.

Re: 6 Months with C#

#62
post #8

I don't understand why everyone on HN hates Windows server so much. From an administration standpoint they are much easier to setup and use thanks to their GUIs. Windows is very standardized and has very good management tools and interfaces. C#, ASP MVC, and Visual Studio are extremely good tools. I've programmed in C# for 10 years and never had a project I could not do quickly with it. It has very good support of 3r…

Why are all people assuming Windows is gui only? You can script practically anything using powershell and multi server management using powershell remoting. System center + ad group policy is light years ahead anything else.

I think PowerShell was a great idea with weak execution. The real issue is that the OS and many Windows services (like IIS) weren't built to be managed via the command line. They're gradually adding support for it, but not in a standardized way.

Configuration and management on Linux is anything but standardized, but it's almost always as simple as changing the right line in the right file in /etc. Also, the ecosystem is so large and mature that tools have been built to make things simpler.

You can manage Windows machines via PowerShell, but that doesn't mean it's easier in practice than SSH and Linux -- particularly given the toolsets (Chef/Puppet/etc) that have been created around it.

Re: 6 Months with C#

#63

Microsoft is trying too hard to make C# answer to every single technology trend, adding dynamic type, asynchronous methods, etc. In most cases you wind up with a working but much worse alternative to the real thing. For example, here's how you create an anonymous function that returns a string in C#: (new Func (() => { return "foo"; }))(); That's pretty awful and as a result you rarely see anyone doing stuff like tha…

You're right, that is awful. It's also unquestionably the worst way to write it. Try this instead:

   () => "foo"
Please don't participate in a conversation if you aren't willing to spend the time necessary to gain a baseline level of understanding of the topic.

Re: 6 Months with C#

#64
post #23
post #8

I don't understand why everyone on HN hates Windows server so much. From an administration standpoint they are much easier to setup and use thanks to their GUIs. Windows is very standardized and has very good management tools and interfaces. C#, ASP MVC, and Visual Studio are extremely good tools. I've programmed in C# for 10 years and never had a project I could not do quickly with it. It has very good support of 3r…

Windows isn't free, so if you need to spin up 10 new servers to meet demand, you can't just DO it. You have to pay Microsoft for the licenses first. It means that all your test and dev servers need non-free licenses.... it's a non-free hassle. Honestly, admin on Linux is not that hard, and server most tools out there were designed for linux first, and Windows instructions are often of poor quality or lacking entirely…

That's not really true -- in practice, most companies have a volume license for production machines, and a single MSDN subscription includes as many licenses for development and test as you want.

I'm not advocating that anyone use Windows, just saying that in practice licensure isn't as hard of an operational problem as it might seem. The price still hurts, though.

Re: 6 Months with C#

#65
post #63

Microsoft is trying too hard to make C# answer to every single technology trend, adding dynamic type, asynchronous methods, etc. In most cases you wind up with a working but much worse alternative to the real thing. For example, here's how you create an anonymous function that returns a string in C#: (new Func (() => { return "foo"; }))(); That's pretty awful and as a result you rarely see anyone doing stuff like tha…

You're right, that is awful. It's also unquestionably the worst way to write it. Try this instead: () => "foo" Please don't participate in a conversation if you aren't willing to spend the time necessary to gain a baseline level of understanding of the topic.

That's not equivalent code, it doesn't execute itself.

That it simply returns a string with no logic and therefore can be written slightly simpler belays the point I was making. You simply don't see this type of code being used much in C# because it isn't idiomatic, yet it exists to mark off a checkbox.

Re: 6 Months with C#

#66
post #63

Earlier quoted context omitted.

You're right, that is awful. It's also unquestionably the worst way to write it. Try this instead: () => "foo" Please don't participate in a conversation if you aren't willing to spend the time necessary to gain a baseline level of understanding of the topic.

That's not equivalent code, it doesn't execute itself. That it simply returns a string with no logic and therefore can be written slightly simpler belays the point I was making. You simply don't see this type of code being used much in C# because it isn't idiomatic, yet it exists to mark off a checkbox.

Fair enough, if you want to automatically execute an anonymous function, your example isn't idiomatic C# either. The idiomatic version would look like this:

    var func = () => "foo";
    func();
As far as "you don't see this type of code being used much", that's just patently false. Anonymous functions (particularly predicates) are the whole way you interact with LINQ.

So I'll ask this: what's the equivalent example in Java?

Re: 6 Months with C#

#67
post #60

Earlier quoted context omitted.

the CLR is currently a place where great languages go to die No, F# is completely supported by MS. And that's the problem with the alternative languages on the JVM. Decision makers are wary of anything that isn't officially supported by Oracle. There are other problems with languages like Scala and Clojure that have nothing to do with official support, but that's another story. The mono story is an interesting one. A…

F# is supported by Microsoft on the Windows implementation of the CLR, which is great unless you're not willing to use Windows. You're right that the JVM itself is irrelevant on mobile, but via Android the Java ecosystem still plays a role.

F# runs perfectly fine on Mono. The F# compiler is open source. Microsoft doesn't have to support F# anywhere else. In fact, Xamarin is going to support F# directly in their new IDE.

Re: 6 Months with C#

#68
post #60

Earlier quoted context omitted.

the CLR is currently a place where great languages go to die No, F# is completely supported by MS. And that's the problem with the alternative languages on the JVM. Decision makers are wary of anything that isn't officially supported by Oracle. There are other problems with languages like Scala and Clojure that have nothing to do with official support, but that's another story. The mono story is an interesting one. A…

F# is supported by Microsoft on the Windows implementation of the CLR, which is great unless you're not willing to use Windows. You're right that the JVM itself is irrelevant on mobile, but via Android the Java ecosystem still plays a role.

[deleted]

Re: 6 Months with C#

#69
post #29

Earlier quoted context omitted.

Because it's too easy! Nerds would rather spend countless hours at the command line figuring things out than having a nice interface to get stuff configured and running. As a developer, I don't want to spend my life also configuring servers - sometimes it's just nice to get things working without a ton of hassle. Of course nowadays we use Azure or AppHarbor for everything but we still have some services running on II…

No one wants to spend their life configuring servers. That's why tools like Chef and Puppet exist -- so you can write code that will do it for you. They just don't work as well for Windows as they do for Linux. After a significant amount of experience in the .NET ecosystem, I believe the majority of the anti-Microsoft sentiment is well-deserved. At one point, there was a lot of innovation in .NET OSS, but it seems to…

It's not that Microsoft or .NET is bad -- it's just that there are better options.

No, there are better options for you.

Re: 6 Months with C#

#70
post #47
post #40

Earlier quoted context omitted.

> After a significant amount of experience in the .NET ecosystem, I believe the majority of the anti-Microsoft sentiment is well-deserved. At one point, there was a lot of innovation in .NET OSS, but it seems to have ground to a halt within the last few years. It's possible I'm just projecting because of my own experience, but it seems like many of the more influential members of the .NET ecosystem have gone on to do…

I don't mean this to be derogatory, but ASP.NET MVC, as great as it is, was not particularly innovative when it was originally written. Entity Framework is an ORM, and by definition not particularly innovative. Why isn't something like Cassandra or Hadoop written using .NET? It's the Windows requirement that makes ideas like that die on the vine. Shit, there are more interesting systems built using Erlang/OTP than th…

I don't mean this to be derogatory, but ASP.NET MVC, as great as it is, was not particularly innovative when it was originally written. Entity Framework is an ORM, and by definition not particularly innovative.

Where did the parent say anything about innovation?

Post reply on HN