without
#17650
Replies: 2 comments
-
sorry the second line of the code example are formatted wrong |
Beta Was this translation helpful? Give feedback.
0 replies
-
Covered in fsharp/fslang-suggestions#762. We generally discuss all all language suggestions in that repository. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have found myself in a situation using anonymous records to collect data, where I collect some intermediate data, and needing to drop it later on after some later point and have the choice either to let it pass through or creating a new record.
A good example is wasm binary parsing where type identifier are collected before the function locals and body.
So I propose that you might include a new keyword "without", which sole intend are to flag that you wish to drop some data from a record.
example
let ar = {| inter = somedata; following = otherdata |}: {| inter : 'a; somedata = 'b |}
let ar' = {| ar without inter |}: {| somedata: 'b |}I know it is a minor thing, but it would be a flag for the compiler that it can drop a data point from there on and from a development point of view it insures that unused data are not floating around longer than needed.
Beta Was this translation helpful? Give feedback.
All reactions