I suggest we ...

Update records to allow embeddable records

Update the sytax of records to allow the following:
type Position = {X : int; Y : int}
type Sprite = {
Position
Name : string
Image : array byte }

Which would result in the Position records fields being embedded into Sprite.

The Go language has such a feature which works quite nicely:
https://golang.org/ref/spec#Struct_types

22 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Dave Thomas shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      F# Language

      Feedback and Knowledge Base