Skip to content

Update FSharp.Core from 5 to 6 or 7, to get less memory usage and better performance #1494

@Thorium

Description

@Thorium

We should update F# core, to get better features, for example, how much class-wrapping is doing the nicePascalName etc in NamingUtils just because it doesn't use Structs.

This would be way more performant code with less memory-consumption:

let private tryAt (s: string) i =
    if i >= s.Length then ValueNone else ValueSome s.[i]

let private sat f (c: voption<char>) =
    match c with
    | ValueSome c when f c -> ValueSome c
    | _ -> ValueNone

[<return: Struct>]
let private (|EOF|_|) c =
    match c with
    | ValueSome _ -> ValueNone
    | _ -> ValueSome()

[<return: Struct>]
let private (|LetterDigit|_|) = sat Char.IsLetterOrDigit
[<return: Struct>]
let private (|Upper|_|) = sat (fun c -> Char.IsUpper c || Char.IsDigit c)
[<return: Struct>]
let private (|Lower|_|) = sat (fun c -> Char.IsLower c || Char.IsDigit c)

But it doesn't compile, because F# 5. So could it be updated to latest stable 7.0.401? Or even 6.0.x to get the structs.
Even worse, these utils are used as paket file references in other F# libraries, causing them to waste resources too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions