-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] Support ECMAScript6 Class Standard #31
Comments
Great proposal! I like the 山海經 style. There also has been a proposal to add object literals. I'm putting the link here as a reference, to make sure the wording/syntax is consistent when they're implemented: https://github.com/LingDong-/wenyan-lang/issues/20 Thanks! |
It looks great. But I wonder where does Considering
class A
{
prop1;
}
class B extends A
{
prop2;
} What about p.s. there are some sentences like |
Update: Object literals are now supported: see https://github.com/LingDong-/wenyan-lang/issues/20#issuecomment-567734481 |
何不简化为
我以为
是不是更加顺畅 |
确实,JS是一个弱类型语言,不需要太过注意。使用元类型即可。但是要顾及到PYTHON的编译,所以有类型会更统一一些
|
js 是 function Foo () {
this.count = 0;
}
Foo.protype.increment = function () {
this.count += 1;
} 如果 wy 支持, 在和 js 互操作时会方便很多 如一些原生API的调用: new Writable({
write(chunk, encoding, callback) {}
})
// 或
new Promise(() => {}); |
Definition
Field
Constructor & Method
Extend
The text was updated successfully, but these errors were encountered: