Live data from Hacker News

More functional C#

news.ycombinator.com

21–30 of 98 posts

Re: More functional C#

#21
post #11

I have read a lot of lang. wars and complaints about programming languages... but C# is one of the only languages that I can't remember reading any complaints about. None. I must conclude, by the usual Stroustrup quote, that no one uses C#. (yes this is tongue in cheek)

It's a little bit too verbose, it doesn't have quite the flexibility or metaprogramming ability of a language like Python.

But in general it's a very solid choice. You can even get around a lot of the inefficiency of GC by careful usage of structs.

Re: More functional C#

#23
post #11

I have read a lot of lang. wars and complaints about programming languages... but C# is one of the only languages that I can't remember reading any complaints about. None. I must conclude, by the usual Stroustrup quote, that no one uses C#. (yes this is tongue in cheek)

Well, I use it =) C# is a language with a somewhat limited market ("Enterprise" applications running on Windows Servers, and yes, I know about Mono). And in this market, a very strict subset of C# (see: Java) is happily used. I know a lot of people who refrain from using even lambdas and implicit typing, let alone the other "fringe functional stuff", because "they make things complicated".

C# is a great language, in fact, I believe it's the best "general language", if there ever was one. The only real problem C# has is it's bad support of non-Windows platforms. As a language, it's excellent.

Re: More functional C#

#24
post #7

But why do things "near functional" when you have F# which is fully functional?

Because "near functional" is sufficient most of the time and if there is no compelling reason to split your codebase among two different languages, you shouldn't do it. Not to mention that there's probably 1000 C# developers for every F# developer

Have a look at http://www.indeed.com/jobanalytics/jobtrends?q=c%23%2C+f%23&...

And someone has to maintain your near functional or functional code

Re: More functional C#

#25
post #7

But why do things "near functional" when you have F# which is fully functional?

Because programming languages are tools. You can take good parts of functional languages and do it in non-functional languages.

Re: More functional C#

#26
post #11

I have read a lot of lang. wars and complaints about programming languages... but C# is one of the only languages that I can't remember reading any complaints about. None. I must conclude, by the usual Stroustrup quote, that no one uses C#. (yes this is tongue in cheek)

You're not hanging around in the right circles then, I hear complaints about C# all the time ;).

While there's plenty of limitations and frustrations you can run into with C#, I've generally felt they were largely due to intentional tradeoffs I can understand, and fail to know a better alternative to. This makes me significantly less ranty about it, in contrast to my other daily bread and butter of C++. Even if I felt both were as limiting as each other, I'd be ranting about the latter significantly more -- simply out of a sense that "it shouldn't have to be this way".

Re: More functional C#

#28
post #20
post #18

Earlier quoted context omitted.

Because you're already using C# and it can?

Can't you mix C# and F# in the same project though?

Yes, but that's a bit pointless since you can do the same thing in both languages, it's just F#'s syntax is cleaner.

Re: More functional C#

#29
post #8

C#'s functional side is why I actually really enjoy working with it. I get to use a nice blend of OO and functional, where each makes sense. OO more on a macro scale, organising code.

The future is to have multi-paradigm languages.

Each paradigm gets used depending on the type of problem being solved.

Post reply on HN