Skip to content
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

Неудобно клонировать объекты #16

Open
Stepami opened this issue Sep 19, 2022 · 3 comments
Open

Неудобно клонировать объекты #16

Stepami opened this issue Sep 19, 2022 · 3 comments
Labels
Feature New feature or request Language Feature New language feature (grammar, semantics, etc.)

Comments

@Stepami
Copy link
Owner

Stepami commented Sep 19, 2022

Допустим, есть тип и его реализация:

type vector2 = {
    x: number;
    y: number;
    lengthSquared: () => number;
}

let v2dOriginal: vector2 = {
    x: 0;
    y: 0;
    lengthSquared => () {
        return x * x + y * y
    };
}

 
Если мы хотим сделать ещё один объект типа vector2, то надо заново расписывать реализацию lengthSquared.

@Stepami
Copy link
Owner Author

Stepami commented Sep 19, 2022

Решение предложено в #1

@Stepami Stepami linked a pull request Sep 19, 2022 that will close this issue
@Stepami
Copy link
Owner Author

Stepami commented Sep 19, 2022

Однако, прежде надо разобраться с #14

@Stepami Stepami added the Feature New feature or request label Oct 20, 2022
@Stepami Stepami added the Blocked Can't be implemented because of dependency label Nov 14, 2022
@Stepami Stepami added the Language Feature New language feature (grammar, semantics, etc.) label Apr 18, 2023
@Stepami Stepami removed the Blocked Can't be implemented because of dependency label Jul 20, 2024
@Stepami
Copy link
Owner Author

Stepami commented Jul 28, 2024

Фича требует переосмысления, поскольку методов в объекте больше нет, они сделаны по модели GoLang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Language Feature New language feature (grammar, semantics, etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant