Skip to content

[Lang] Explicit new variable and hide variable #8662

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

windwhiterain
Copy link
Contributor

@windwhiterain windwhiterain commented Mar 18, 2025

In many language e.g. rust, we can use let a = 1 to create a new variable. However, in taichi set the value of a variable and create a new variable writes in the same way.
I made two hints: taichi.new and taichi.hide that used in annoted assign to specify if we want to create a new variable in current scope or hide a variable in previous scope with a new variable.

@feisuzhu
Copy link
Contributor

feisuzhu commented May 7, 2025

/rebase

@taichi-gardener taichi-gardener force-pushed the explicit_new_variable_and_variable_hide branch from 00c1f17 to 7a08fb7 Compare May 7, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants