Replies: 2 comments
-
|
其實這樣寫只是要回避 TS 的型別檢查,實際上是不應該這麼寫的🙈 |
Beta Was this translation helpful? Give feedback.
0 replies
-
咦 TS 是會給它報什麼樣的問題呀? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
之前在 #29 裡提過一下,雖然沒採用,但放在這裡待討論。
#29 原本在
音韻地位.constructor中加上了這樣的代碼(當時未考慮constructor):其作用是將
音韻地位的屬於、判斷等方法在構造時立即 bind。這樣會使這些方法的用法與 Python 相仿,但符不符合 JS 中對「對象方法」的期望行為呢?
(而且印象中除了 Python 外,別的語言(無論動態靜態)幾乎都沒有這種「隱式 bind」的用法(討論見此)
Beta Was this translation helpful? Give feedback.
All reactions