I am a C # developer. Should I search more F #

Possible duplicate:
What are the benefits of using C # vs F # or F # vs C #?

After reading some on this issue and watching this video http://streaming.ndc2010.no/tcs/?id=29649A14-2F1B-428E-BB12-9A43A1676221 , where Eric Lippert, John Skeet, Mads Torgersen and Neil Gaftter discuss the future of C #, its pretty clear that C # has heavy luggage from earlier functions added to C #. These features should be supported in later versions of the language, even if they add complexity and make adding new features more cumbersome. This is probably why most languages ​​die sooner or later.

F # is a new language and obviously does not have the same heritage to worry about, as both general-purpose languages ​​seem tempting, focusing more on F #. What do you think, F # is going to take over C # as the language of choice in the .net world and in the case when this happens soon?

I know that there is a difference between functional and imperative languages, so you can argue that they are too different to be comparable, but the fact that C # gets more and more functionality, I have to ask, why not just don't go directly to f #

+7
c # f #
source share
5 answers

First, don’t think that division is “functional” and “statically typed” - F # is still a statically typed language.

Think F # will get the better of C #? Not in many areas. In some niches, this will definitely make its mark ... but I personally find it more important for another reason: it will encourage people to think more functionally.

You should look carefully at F # - to improve your C #. You will not find that each task is suitable for a functional approach, but it is definitely worth learning to think a little differently.

At this point, I should probably plug in Real World Functional Programming - mostly written by Thomas Petrichek, with a little help from me. It was aimed specifically at developers who want to think more functionally, with a strong bias from existing C # developers who are interested in F #. (And today - September 4, 2010 - the book is only $ 15. Use the dotd0904cc code when placing an order :)

+14
source share

C # is here to stay. Most commercial developers (and almost all commercial .NET developers) learn and use C derivatives, imperative languages ​​/ styles.

I don’t think that the development world will undergo such a radical paradigm shift that the OO imperative will disappear in favor of functional hybrids, unless, of course, you consider your own transition from C # to the field of functional hybrid.

(by and large) You simply cannot hire F # developers, you cannot find a job as an F # developer, you cannot convince most able-bodied C # 'er (those who are not fans of the language or amateur coders in their free time) that F # is something more than an academic toy, or simple enough to make it worth exploring.

I would like this to be wrong, the more I learn F #, the more I would like it to be the language that I use daily.

In answer to your question: YES! learn F # because it's a great language, but it's not going to crush C # overnight (or over the next decade).

+8
source share

Should you take a look at F #? Yes, but because F # is an interesting language and you will learn new things; not because you are playing defense against the chance that "C # is on the verge, and F # is the wave of the future." C # is well established, a great language with a great community and many existing assets (tools, samples, templates, ...) that make it extremely unlikely to be superseded by any other .NET language in the near future. Learn F # to play the crime: develop your own set of skills and become a better developer (even if you are still mostly working in C #).

(The creep and obsolescence function slows down the work of some languages, but not much. From what I collect, C ++ is still used, despite the crushing legacy. :) You said that languages ​​die "sooner or later", t remember which or a language that reached the core, but then died "earlier.")

+4
source share

First of all, F # is a more specialized language than C #. Yes, you can write solutions for almost everything that is in F #, but you will find it especially useful:

  • Implementation of complex algorithms with a large number of transformations
  • Parallel Algorithm Implementation

You will not find F #, which has powerful capabilities in areas such as access to the user interface or database (everything can be done correctly, but you won’t find such a difference as using C #).

Secondly, I do not think that F # will take over C # as a whole, but there are certain niche markets (for example, the financial industry) where F # have a real chance to get a look over other languages.

Finally, the functional programming paradigm, as you yourself mentioned, made several other languages ​​/ platforms on the roads (Python, Ruby, C #, VB.NET, I hope the next Java), so getting to know its concepts will be useful, and right now, by at least on the .NET platform, F # is the surest implementation of such concepts.

+2
source share

In short: You should probably not use F # as a general-purpose language, such as C #, but add it to projects where appropriate .

General-purpose problems often differ too much from the functional paradigm that F # does not really succeed, but in some cases F # is absolutely the right tool. In any case, it is worth taking a close look, because otherwise you will not be able to actually point out those cases where a favorable functional approach (even if it is implemented in C #).

Good problems for F #:

  • Mathematics / Physics / Simulation / Visualization
  • Data Extraction / Processing
  • Reactive GUI
  • Asynchronous code (events, callbacks)
  • Parallel execution
  • Analysis (domain specific languages)
  • Language programming (customize the language using its own functions)

Edit: Clarification after downvoted. Of course, F # is a common goal in the sense that you can do everything with it and target the entire .NET platform as C #, but because it can be used, it does not mean that it should.

As I said, many “general-purpose” applications are not inherently functional, and are largely based on state changes or general object-oriented patterns. While you can again use F # there, in fact it does not shine in this case, being programmed against it by nature.

Why should you use a functional language if you do not solve a functional problem? And since you don’t have to, just combine F # and C #, where each one fits best.

0
source share

All Articles