Rescript in neovim
@dkirchhof thanks for your help. Unfortunately the issue is still here after I enabled dynamicRegistration. I still need to restart the LSP to see things changing. I also noticed that it’s not working...
View ArticleMy main gripes with rescript (constructive criticism)
i’ve been using rescript since 10.1 or something, quite a bit before async/await was even part of the language. today, i’m basically only using rescript if i can. it’s my favorite language no matter...
View ArticleRescript in neovim
Your assumption is right, the language server doesn’t inspect the code, it uses the compiler output to check for errors and warnings. So you have to start neovim in the root directory (where the...
View ArticleModule functors vs. records-of-functions for interface/implementation separation
i tend to always do records-of-functions because its easier to pass around, but it might because i don’t know something about rescript. see the two examples: module Example1 = { module type Printer =...
View ArticleMy main gripes with rescript (constructive criticism)
This is a lot, I will address only #1 for now: We want to keep the formatter non-configurable. We’d rather relax some rules so please if there are any particular problems just create an issue. One...
View ArticleMy main gripes with rescript (constructive criticism)
thanks, not really, i often have stuff like @module("x") extern f1: t1 => t2 = "abc" @module("x") extern f2: t1 => t2 = "abc" @module("x") extern f3: t1 => t2 = "abc" @module("x") extern f4:...
View ArticleMy main gripes with rescript (constructive criticism)
i’m not sure i’m communicating it well. it’s because some of hte lines will be beyond 100 chars and some won’t, and the formatter ruthlessly breaks the longer ones. it’s by design and that’s why i’m...
View ArticleMy main gripes with rescript (constructive criticism)
Just put your example with the description in an issue. Whether we fix that with a formatting directive or just relax the formatter rules can be further discussed in the issue.
View ArticleMy main gripes with rescript (constructive criticism)
github.com/rescript-lang/rescript [formatter] [minor] formatter aggressively reformats externs into a mess opened 12:33PM - 08 Oct 25 UTC tx46 background:...
View ArticleModule functors vs. records-of-functions for interface/implementation separation
I think passing records of functions is quite uncommon in ReScript. The more idiomatic convention would be to use modules or even just pass the function as a parameter: module Example3 = { module...
View ArticleModule functors vs. records-of-functions for interface/implementation separation
thanks, i realize that you can pass around functions but if we’re building a dependency root which has services that model behaviors, they usually come as “bunch of functions” rather than a single one...
View ArticleMy main gripes with rescript (constructive criticism)
2. .resi files Private-by-default is maybe a thing we can tackle when the old build system is gone. Maybe. I still love to prototype without having to do all imports and generate the interface after...
View ArticleMy main gripes with rescript (constructive criticism)
About 5. you can use the public parameter inside sources of rescript.json (see docs): ... "sources": [ { "dir": "src", "public": [ "MyPublicModule"] }, ], ... About 7. adding type annotations is kind...
View ArticleModule functors vs. records-of-functions for interface/implementation separation
then module functions (or first class modules) is the way to go.
View ArticleModule functors vs. records-of-functions for interface/implementation separation
do i understand you correctly, you’d suggest something like this? // Clock.res module type T = { let now: unit => float } // SystemClock.res let now = () => {...
View ArticleMy main gripes with rescript (constructive criticism)
thank you for your thoughtful reply we all have different ways to model or approach problems. i tend to agree with you, i don’t want us to get rid for resi files, but again, usually we only need...
View ArticleModule functors vs. records-of-functions for interface/implementation separation
toying around with first-class modules, i’m doing this: type t = { clock: module(Clock.T), getLog: string => module(Logger.T), } let make = () => { module C = SystemClock let getLog = (name)...
View ArticleMy main gripes with rescript (constructive criticism)
For error messages, please make a habit of opening an issue whenever you find something that could be improved. If you have suggestions as well, that’s great. And tag me if you want. Error messages...
View ArticleMy main gripes with rescript (constructive criticism)
RFCs for some Stdlib additions are overkill. Just don’t add all of them in one PR so that they can be discussed independently. One PR per Stdlib file would be nice. If you have some bigger ideas (like...
View Article