I suggest we ...

Allow record types to implement interfaces just by adding the interface name when compatible

When a record type already has all the members necessary to impement an interface, it could implement it without having to write the code.

For instance:

type IHasAnAge =
abstract member Age: int

type Person = {
Name : string
Age: int
} with interface IHasAnAge

32 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Pierre Irrmann shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

F# Language

Feedback and Knowledge Base