1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-25 18:22:09 +00:00
seirdy.one/content/notes/yuescript-first-impressions.md

15 lines
879 B
Markdown
Raw Normal View History

2023-02-15 17:35:15 +00:00
---
title: "Yuescript first impressions"
date: 2023-02-15T09:35:15-08:00
2023-02-15 17:36:28 +00:00
syndicatedCopies:
- title: 'The Fediverse'
url: 'https://pleroma.envs.net/notice/ASi7iC9E0WfUIObg5A'
2023-02-15 17:35:15 +00:00
---
I just discovered [Yuescript](https://yuescript.org/doc/), which is like MoonScript with more features. I have mixed feelings.
I like features like pipelines (much cleaner than repeated assignment or nested parentheses in function calls) and compile-time macros. The sugar for multiple and destructuring assignment is handy.
2023-02-23 23:53:29 +00:00
I find the additional operators unnecessary, and not worth their cognitive overhead. It re-uses some operators for different purposes, creating confusion. The `[]` operator could easily have been a function in a library instead.
2023-02-15 17:35:15 +00:00
One of the trade-offs for this much syntactic sugar is some syntactic ambiguity. An opinionated formatter could resolve some of this.