🚀 Exciting News for @rescriptlang Developers! 🚀
The upcoming ReScript v12 completes the transition from curried to uncurried syntax, enhancing JavaScript integration while requiring minimal code changes. 🧩
🔍 Here’s a quick rundown of the transition through different versions:
1. Explicit Uncurried Syntax: Initially introduced with (.x) => x + 1.
2. Uncurried Mode: Differences between curried and uncurried syntax are ignored; all interpreted as uncurried.
3. Final v12 Syntax: Syntax identical to the initial language, with a new operator foo(2, ...) for explicit partial application.
Key Differences:
- Explicit arities: (x) => (y) => x + y ≠ (x, y) => x + y, just like in JavaScript.
- Partial application is now explicit.
🌟 What made the transition challenging?
- Ensuring minimal code changes for developers.
- Maintaining backward compatibility while introducing new syntax.
🔧 Typical Changes Required:
- Adding explicit partial application.
- Making arities explicit, choosing one interpretation for nested types.
🔍 Big Changes in Principle, Few in Practice:
- Despite potential for significant changes, most projects need minimal adjustments.
- This suggests that explicit arities were already common in everyday code.
Alpha versions are coming soon. Get ready to experience a smoother, more powerful ReScript! 💻✨