Hiya there this is a kinda sad letter, as I’ll be moving away from rescript. I feel like your recent steps from reasonML to rescript were grave mistakes that took away from what made reasonML special and worth advocating for.
I don’t exactly want to change your mind on these things, as this is your project and if you feel that you’re doing the right thing you should absolutely move forward with it.
However I think that since you’re showing respect towards the community by actually exposing the reasoning behind your decisions I could give you my take on that reasoning, even if I’m just one of many and will probably have no impact on rescript as a whole.
Removal of custom infix operators
From what I understood you’re moving away from custom infix operators because you felt like they increase the complexity of the code.
While I can certainly see what you mean I think it’s a fallacy to assume that the problem lies with custom operators. The amount of custom utility functions that are duplicates and/or neither aptly named nor necessary (because they’re already included in the stdlib or some existing dependency) is staggering. It all boils down to “knowing formalisms”, and custom infix operators are a very handy way to define such concise formalisms. If you know them you can read and write code much faster than without them. Go ask a lawyer or mathematician about how well defined formalisms help them in their everyday life. And yes, that raises the barrier for new programmers but at some point you’ll have to realize that you can’t build an airplane with just a hammer, at some point you’ll have to learn to use complex machinery.
Oh, and underlying that decision with a guy that basically discards every advantage of swift over objective-c as being “fancy new bling-bling” doesn’t exactly help make a point of why people should adopt a new language.
There are definitely some nice advantages to this, and yes, I’ve run into one exact problem of data-last every now and then. However…
More straight forward type inference
Yes, definitely nice, but I have to say that I cherished not having to provide unit as a last parameter far more often than I was annoyed by having to explicitly annotate something
Transpilate size is a considerable factor… but it probably pales in comparison to the number of apps that still target es6. Latest chrome dev summit has a nice video on this I think.
Oh, definitely useful. However… how many people are using typescript? Have you seen a typescript error in a complex codebase?
I encourage you to set up a typescript project with xstate and pass an invalid object to
service.send. Or provoke a situation where bivariance comes into play (react typings hack anyone?). In the best case typescript errors are as straight forward as reasonML errors were and in the worst case they’re plain wrong or misleading.
And how many devs have you seen move away from typescript because of that alone? We still put up with this because “trying around will fix it anyway”. It’s not important to understand the error, only to fix it. Not that I agree with this approach, but convincing someone to learn a new language (no matter how similar, build chain alone is a big point here) based on concise error messages is a really tough sell.
Overall I feel like these moves made rescript more approachable to people that come from an OOP background by defining a way of writing idiomatic rescript that does not enable FP patterns as well as reasonML did.
You can certainly argue that this is a good thing, I’d argue that it enables perpetuation of antipatterns and most importantly it really diminished the incentive to move away from typescript as I think the same patterns that grew because of OOP and are perceived to be “clean code” will now move over to rescript. So if I’m going to have the same conceptual problems with rescript, why would I switch?
That together with the dropping of local open means for me that there is really little sense in advocating moving from typescript to rescript, even if I still think it’s a superior language.
Rescript has just lost its appeal as “something different” that enables a way forward, a way to break with these old habits that are only perpetuated “because that’s how we always did it” and - massively overexaggerated and slightly joking - I’m just waiting for you to introduce the
ReasonML enabled me to solve a year-long problem and made me adopt patterns in typescript that are now being seen as extremely useful and “the way to go” by many others at my company, including some hardcore OOP enthusiasts (former Java programmers) and for that I think you deserve huge credit. You reshaped the way people think about functions and react components.
But right now I think that you’ve diminished your advantage (and chance to shape the future of programming) over other languages for something that won’t help the industry in the long term. Sorry for the wall of text and I sincerely hope you’re successful in your endeavour, I’ll be keeping you on my radar.