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 836763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:02:12+00:00 2026-05-15T05:02:12+00:00

I’m in the process of designing a .NET API to allow developers to create

  • 0

I’m in the process of designing a .NET API to allow developers to create RoboCup agents for the 3D simulated soccer league.

I’m pretty happy with how the API work with C# code, however I would like to use this project to improve my F# skill (which is currently based on reading rather than practice).

So I would like to ask what kinds of things I should consider when designing an API that is to be consumed by both C# and F# code.

Some points.

  • I make fairly heavy use of matrix and vector math. These are currently immutable classes/structs.
  • The API currently defines a few interfaces with the consumer implements (eg: IAgent), using instances of their implementations (eg: MyAgent) to construct other API classes (eg: new Client(myAgent)).
  • The API fires events.
  • The API exposes a few delegate types.
  • The API includes several enums.

I’d like to release a version of the API as soon as possible and don’t want to make major changes to it later if I realise it’s too difficult to work with from F#. Any advice is appreciated.

  • 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-15T05:02:12+00:00Added an answer on May 15, 2026 at 5:02 am

    The best advice is probably to try using the API from F#. 🙂

    That said, I think what you have sounds fine

    • any good C# API should be a pretty good F# API
    • there’s a little friction when using delegates/Func/Action at the boundary, but there’s nothing you would change here
    • enums, events, interfaces, classes, structs are all fine
    • if possible, do avoid APIs that return values that are typically ignored (e.g. fluent interfaces that ‘return this’ to be able to ‘chain calls’ – these cause F# to need lots of |>ignores)

    But really, take an hour and try writing an F# consumer of the library. In all likelihood, in the worst case, you might suggest a few helper functions or extension methods for F# to smooth over any friction points at the interface boundary, but I think what you have should all just be fine.

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

Sidebar

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.