Coffeehouse Thread

15 posts

Is F# really "C# Advanced"?

Back to Forum: Coffeehouse
  • tomkirbygre​en

    So back in the day we had Mort (VB), Elvis (C# with a web bias) and Einstein (C++). With F# becoming an 'official' language sponsored by the C# team what persona should we encumber tag F# with?

    Joking aside I find the intersection of C# 3.0, F# and ParallelFX with their common Functional meta-theme an interesting mix, esp. with the apparent degree of involved shared people resources within Microsoft. Is F# destined to become "C# Advanced"? Or will C#'s eventual replacement be Elvis-orientated version of F#? What do folks think?

  • kettch

    It looks like they are trying to create a language that allows you to jump between imperative and functional programming where it makes sense to do so. C# isn't losing it's imperative abilities, so you will always be able to do pure imperative development. F# will be there if you want pure functional, and it looks like C# will be the choice if you want the best of both worlds.

    There's a certain point where they really won't be able to merge the two concepts any further. However, they are both first class .NET languages. If necessary, you can do strictly imperative development in C# and then reference F# assemblies to do things that would benefit from the language features.

  • tomkirbygre​en

    I actually think they will need to eventually have just one functional language (doesn't mean, and I expect them to, that MSR won't have post F# languages). Something that most likely replaces both C# and F#. I don't forsee wide adoption of "two functional languages" based solutions. Folks generally want a one stop shop. It's possible to argue that C# + XAML is a two language solution, but in my experience bosses don't see it that way. Whereas if I where to propose a solution based on C# with a "dash of F#" I would have a hard job justifying the additional complexity cost.

    No, ultimately I think MS need to cap off C# before it ends up in the mess of language corner cases that C++ has decended into. I'd much rather look back on C# fondly than have too many disperate paradigms bolted onto it until it starts looking like a Vogon Construction Ship.

  • kettch

    dot_tom wrote:
    Whereas if I where to propose a solution based on C# with a "dash of F#" I would have a hard job justifying the additional complexity cost.


    What complexity? One .NET assembly is the same as another, and it all boils down the MSIL in the end anyway.

    dot_tom wrote:
    No, ultimately I think MS need to cap off C# before it ends up in the mess of language corner cases that C++ has decended into.


    While I agree with you in principle, I'm not ready to second guess Anders, et al, quite yet. Some of the videos with those guys really seem to indicate that are really trying hard not to screw this up, and they are way smarter than I am. On the other hand, a language must grow with the needs of it's users, so it is a bit of a tightrope act.

  • tomkirbygre​en

    It's economics. I (or rather my company) can hire C# developers very very easily. Not true for F#. Yes at the assembly level its all (mostly) opaque, not so at the source level. I was talking about the cost of the solution over its life time, i.e. making changes. In general from my reading of posts to Channel 9, the folks who hang out here do not represent the majority of career developers. '9'ers tend to be far more tech savey.

    I'd be the last person to second guess Ander's and kin, I do think that its going to take at least 5 years for functional programming to really show up as a significant market trend. At one end of the pipeline educators are going to have to put functional programming back on the agenda and stop mass producing Java developers, and at the other end of the pipeline employers are going to have to firstly become aware of business advantage and then create the need. Right now there's a lot of vested OO orientated career developers out there and there is I'm afraid a heck of a lot of C# 1.1 still written. Personally I think of C# 3.0 as a sociological experiment, it's the market testing of main stream functional idioms. My guess is that by the time it gets even close to being widely grokked by the community it'll have been replaced by Anders et al with something far more refined. It's even possible I guess that Anders next language might not be as statically typed as his last two (but that's a whole other subject... maybe).

    It's going to be very interesting I think to see over the next two years what marketing message Microsoft puts behind F# now it's profile has been raised.

  • esoteric

    A social experiment? People have done functional programming for a long long time. It's called SQL. LINQ will also give design-time support for queries, you don't get that with embedded SQL. It looks like a pretty safe path to me.

    C# 3 is only a new language in the most shallow way - it's different, it's more, but it has a lot of C# 2 in it. Use what makes sense to you, ignore the rest.

    Asking whether F# is advanced C# is quite meaningless, how's one supposed to answer that. If F# is functional from the ground up, but also has support for objects.

    The whole point of .Net is to not have to choose one language over another, it's an "ecosystem" of languages based on the same low-level language (CIL).

  • Isshou

    esoteric wrote:
    A social experiment? People have done functional programming for a long long time. It's called SQL. LINQ will also give design-time support for queries, you don't get that with embedded SQL. It looks like a pretty safe path to me.


    Let's not forget about the myriad of actual functional programming languages: APL, Lisp, ML (and it's various versions), Scheme, Haskell, Mathematica... And some of these have pretty significant histories dating back to the 50s, 60s, and 70s (Lisp, APL, ML and Scheme respectively) so they can even pre-date SQL (1974).

  • nightski

    dot_tom wrote:
    So back in the day we had Mort (VB), Elvis (C# with a web bias) and Einstein (C++). With F# becoming an 'official' language sponsored by the C# team what persona should we encumber tag F# with?

    Joking aside I find the intersection of C# 3.0, F# and ParallelFX with their common Functional meta-theme an interesting mix, esp. with the apparent degree of involved shared people resources within Microsoft. Is F# destined to become "C# Advanced"? Or will C#'s eventual replacement be Elvis-orientated version of F#? What do folks think?


    Man why do we always have to label things the "best".  Is it an American trait?  Do we always have to categorize things? hehe

    Ok sorry bout that rant.  Anyways I don't think it is C# advanced at all.  It is just a different way to solve a problem.  The best developers will always have lots of tools at their disposal, and this is just another tool.

    As for justification for using it on a real world project?  It is true that it is going to be harder to find F# developers out there.  But to be honest, F# is really not that hard to learn!  Its even easier with the new books out there.  At first is can seem really confusing, but since it supports some imperative constructs it is not as daunting as say a language like scheme.

    Encouraging your developers to learn F#, maybe even giving them some time during the week to work with it would not only help them but it will help you too.  Having a more competent development team never hurts.  Find that person on the team who loves new technologies/languages and get him going on it.  Then let him mentor the other developers on the side.  Doesn't have to be formal or anything.

    Maybe use it for tools?  Unit tests in F#?  Something non-mission critical at first (not implying that tests aren't mission critical, but you get the idea).  Just so people can become familiar with it.

  • Ion Todirel

    does F# can output native code?

  • TimP

    Ion Todirel wrote:
    does F# can output native code?


    It outputs MSIL like all .NET languages. Native implementations like OCaml can generate machine code.

  • brian.​shapiro

    I haven't been following this as closely as I could.

    What is or is not an implementation of the ideas in Comega

  • Isshou

    brian.shapiro wrote:
    I haven't been following this as closely as I could.

    What is or is not an implementation of the ideas in Comega


    The problem is that C Omega is not the originator of all its ideas.

    F# is another MS research language that is more influenced by python, ML, C#. Its roots lie in Functional programming rather than object oriented programming

    MS Research F# page

  • brian.​shapiro

    Isshou wrote:
    

    The problem is that C Omega is not the originator of all its ideas.

    F# is another MS research language that is more influenced by python, ML, C#. Its roots lie in Functional programming rather than object oriented programming

    MS Research F# page


    I've programmed in functional languages before, like LISP (thats what you start with in CS at Berkeley).

    But I'm wondering about the "data-oriented language" concept they were trying out with Comega.

    Do they ever plan to integrate all of Comegas concepts (beyond LINQ)

  • JChung2006

    No, F# is not C# Advanced.  It's "something completely different."

    Hmm, that line might have made funnier if we were talking about IronPython instead.  Ah well...

  • magicalclick

    Sing# will be the next gen C# if you ask me. It is a prototype language for the researching OS. The language has a process communication protoco that's really low overhead. And if Singularity ever push out, Sing# will the main programing language for it for sure.

    Leaving WM on 5/2018 if no apps, no dedicated billboards where I drive, no Store name.
    Last modified

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.