Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3979572
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:11:11+00:00 2026-05-20T05:11:11+00:00

I have a WCF service(maybe multiple services) and a client in Silverlight(C#). As I

  • 0

I have a WCF service(maybe multiple services) and a client in Silverlight(C#). As I read somewhere on the web F# is great for async and parallel programming. I want to give F# a try and write a library that communicates to given WCF service, handles it’s faults and returns result.

Are there any benefits of doing so, except learning new language and func programming?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:11:12+00:00Added an answer on May 20, 2026 at 5:11 am

    Yes, I think F# can be quite useful for asynchronous programming in this scenario. If you want to write your asynchronous code properly, you need to use BeginFoo/EndFoo methods or you need to use event-based API to avoid blocking the UI thread when performing some asynchronous call. As a result, you cannot write code in the usual sequential style – just by doing one operation after another. Instead, you need to wrap everything in callbacks that contain separate exception handling.

    In F#, you can use asynchrornous workflow that hide all the “callbacks” and automaticaly wrap everything in exception handlers. As a result, you can write asynchronous code that does multiple calls as a sequential code and use all usual control flow constructs (such as try, for, while, …). You can write:

    let processData(userInputs) = async { 
      try
        let! temp = Service.AsyncDoSomething(userInputs)
        let! res = Service.AsyncDoSomethingElse(temp)
        return res
      with e ->
        // Handle exception
    

    This calls the DoSomething operation asynchronously and moves the rest of the function into a callback that gets executed when the operation completes (and similarly for DoSomethingElse). However, the exception handling can be written in the usual way. The feature is also nice for writing some user interface interactions (see for example this SO post or the recording of my F# talk at London User Group)

    The disadvantage of using F# for this project that it doesn’t have any direct support for WCF. You can certainly use it, but you’ll have to write C#-style mutable classes, which doesn’t look that nice – a good option may be to use a C# library and define the usual necessary WCF stuff there (and then just use it from F#).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight 3 application which needs to call WCF service. The WCF
I have a WCF service that uses ODP.NET to read data from an Oracle
I have web-service (wcf) to analyze files. Size of files are 1-10 mb. File
I have a WCF 3.5 service and it runs great. It is using basicHttpBinding
I have a WCF service with a client application. I have complete control over
I have WCF Class library, WCF Service Client and WCF Service Server in one
I have a wcf client which receives a dataset from a wcf service. It
I have Silverlight application which connects to a WCF service. If i open the
I have a wcf service (parser service, byte[]=>string) [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)]
I have web application with WCF service. That service contains method that implements message

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.