Suggestion: Allow function names starting with @
Considering the @reactive decorator, its usage is very clear: `@reactive accessor value`.
However for the definition it is not that clear:
```js
function reactive(target, desc) {
// ...
return { get, set, init }
}
```
It may looks more confusing if the decorator itself takes arguments.
So if it can be defined with a @ prefix in its name then everyone knows it is a decorator:
```js
function @reactive(target, desc) { }
```
And this also allows decorators and normal functions share names:
```js
function @foo () {}
funcition foo() {}
foo() // function foo is called
@foo // function @foo is chosen because it is more specific.
bar
```
0 条评论