Skip to content

[Enhancement] typeof #34

Open
Open

Description

@yezhiyi9670

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)

Activity

  1. kindlich commented on May 26, 2020

    @kindlich
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions