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

[Enhancement] typeof #34

Open
yezhiyi9670 opened this issue Feb 20, 2020 · 1 comment
Open

[Enhancement] typeof #34

yezhiyi9670 opened this issue Feb 20, 2020 · 1 comment

Comments

@yezhiyi9670
Copy link

ZenScript doesn't require a typename for declaring a variable, but is still very strict with types. However, the documentation sometimes does not describe the types accurately.

I suggest adding a global keyword or global function typeof which return the type of a value as string. This can make debugging much easier.

(Please let me know if there is already one)

@kindlich
Copy link
Contributor

Hey there, and sorry for the late reply ^^'.

I feel like adding another keyword to ZS at this point would carry too much of a risk to break existing scripts.
However @TheSilkMiner has created a mod that offers some methods get the type of an object iirc.
See this (currently still open) PR for more information:
CraftTweaker/CraftTweaker-Documentation#286

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

No branches or pull requests

2 participants