Replies: 16 comments 14 replies
-
@baronfel's thoughts from #13118 (comment):
|
Beta Was this translation helpful? Give feedback.
-
A comment from Josh |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Assuming the purpose is 1) making the fsharp codebase more approachable to contributors and 2) lower maintenance. Over at @darklang we've had success with:
|
Beta Was this translation helpful? Give feedback.
-
Initial thoughts on the repoI am new to the repo (started first PR a month ago). It did seem to need serious improvement. F# should result in easy to understand code (with ordered definitions, static types, high s/n ratio, types matching domain). But this is not apparent when looking at the F# repo. I made some notes then. There may have been improvements since then.
So @dsyme suggestions are good
Most important
Yes will be a large improvement. Doesn't matter whether auto-formatted or manually formatted: the formatting is so bad that anything will be a large improvement.
Yes useful, and if it could also-align the type arguments between signature and implementation that would be even better. If both things were done a reader would not need to read the signature file to understand the code.
In local scopes these are fine. Suppose the code says Other things to consider
|
Beta Was this translation helpful? Give feedback.
-
Thank you @charlesroddie and @pbiggar - all good suggestions! One comment - existing code is not sacrosanct - we can certainly clean-up everything at the moment. Once upon a time there were multiple forks (e.g. FCS a separate fork) and multiple major active features= branches making clean-up painful, but right now things are at a good point where we can sanitise rapidly. The availability of fantomas is a key factor in this. I'll fold the suggestions into the overall working list above. Folder structure has been dealt with, at least to first approximation. |
Beta Was this translation helpful? Give feedback.
-
I think we essentially never use |
Beta Was this translation helpful? Give feedback.
-
These are pretty standard now - we order |
Beta Was this translation helpful? Give feedback.
-
In principle this would be great, but the practicality of this is unclear to me, since we need to test/debug/deliver on multiple OS, and especially Windows (since this repo includes Visual Studio integration and testing). Splitting the VS Integration out of this repo has been discussed from time to time, though it would massively reduce efficiency of creating IDE features, since people frequently contribute across the FCS/FSharp.Editor divide, and it's one of the most important areas we need to make efficient for the benefit of the whole F# ecosystem. A standard problem of monorepo v. multi-repo. |
Beta Was this translation helpful? Give feedback.
-
We have this today - |
Beta Was this translation helpful? Give feedback.
-
I'll record this as
|
Beta Was this translation helpful? Give feedback.
-
This is a good topic for discussion. There are various "soft" boundaries in the compiler, meaning data structures which almost act as an abstraction boundary, but where the representation is still exposed in the signature file and can be accessed or matched on. One pervasive example is However even if we eliminated type inference equations,
Some active patterns exist to make this simpler but they are not used methodically (and may also have performance implications if they were) People working with Another problem is that we have multiple representations of types/metadata
The unification of property/method/event data happens in I'll add these topics to the list above |
Beta Was this translation helpful? Give feedback.
-
Hello, I've been working on the compiler for some time now, here are some remarks in no particular order:
I would also like to express my interest in the tool that syncs the XML documentation comments. |
Beta Was this translation helpful? Give feedback.
-
Hello, I haven't contributed to the codebase yet, but have spent some time looking into it, trying to focus on improving performance. I would find it useful if there were:
I would be happy to spend some time working on improving performance and/or making the above reality, but would find it difficult without guidance from the existing contributors. There is a separate discussion on performance and making it easier to analyse & optimize it, but it's not very chatty, so I thought I'd post here too. |
Beta Was this translation helpful? Give feedback.
-
Continuing on ramblings around code formatter and style guide, and how it applies to this repository, from #13312 (comment): there are constructs, that I feel make code reading, and also some operations when editing/writing a better experience:
ValFlags relies a bit on similar things (and would benefit from manual prettifying). Turning all the screws super tight, without considering that the formatter and classic style of choice should mature to allow those variations will make it harder to enable formatter on all code (makes it harder to commit to implementing it on codebases at large too). It has been a pain point for colleagues, for adopting F#, where they felt it takes more effort to type in code that is formatted and consistent in layout, compared to vanilla Visual Studio, or Visual Studio + Resharper, both for C# and VB.NET code. Resharper has support for some of those refined formatting styles for C# and VB.net (beyond what VS offers), and I've played with stylish-haskell (https://github.com/haskell/stylish-haskell) which made it super easy to do the kind of alignment I'm referring to. What is the good place to have discussion pertaining to formatter and style guide symbiotic relationship? Putting the onus on fantomas repository isn't fair; especially if there is no actionable / endorsed plan for extending it, and having the community hashing on those concerns would be good, to evolve the style guide, even if it isn't tooled. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone . |
Beta Was this translation helpful? Give feedback.
-
I've been doing PRs for cleaning up the code, splitting out files, formatting the signature files and so on.
I'd like to hear from everyone what other systematic code improvements we could make. Here's a working list (updated to reflect various suggestions below):
x
ore
ort
, most critically when used for multiple types especially in the same file, e.g.e
forexception
ande
for `expression.let f x = ...
with local function also takingx
.abbrevthing
identifiers that run together abbreviations and so on. I removed a lot viaexprty
-->exprTy
and so on///
comments on everything///
comments on signature and implementationTType
follow regexp schemety|[a-z]+Ty
.(Cleaning up the code - your input please #13116 (comment))
TType
] * [ ] Properly document and/or tighten the pseudo-abstractionsTType
,MethInfo
,PropInfo
and so on. See this commentBuildGraph.fs/fsi
intoFacilities
CompilerLocationUtils.fs/fsi
-->CompilerLocation.fs/fsi
FxResolver.fsi
TypedTree.fsi
CheckPatterns.fs(i)
out ofCheckExpressions.fs
Facilities
or renameUtilities
Logger.fs/fsi
FxResolver.fs
--> FacilitiesProblems reported:
Not all test projects seem to be runnable (on @charlesroddie's system).
Note: this may be documented in TESTGUIDE.md, but it's too unclear what is and isn't runnable, e.g. in debug mode.
Existing coding conventions to document/enforce:
open
- we orderSystem.*
thenInternal.*
thenFSharp.Compiler.*
each alphabetically.ignore
except with identifiers, and almost never uselet _ =
. We may occasionally use|> ignore
Beta Was this translation helpful? Give feedback.
All reactions