Ad
  • Custom User Avatar

    Can you explain why if accepts a predicate value instead of a thunk, while for and while predicates accepts a thunk? This is not how typical languages handle if statements with side effects.

    It was never specified that multiple values can be in _case. This only occurs in the test cases.

    The question below should be an issue: const is only tested for direct assignment.

    (Also, I don't agree that const variables can be deleted. It's const after all. In almost all languages you can't do this either.)


    Related: You only gave primitive examples of the expected behaviour in terms of a giant code block. This is not acceptable as kata specification.

    For a proper language you need to specify the syntax of the language (what goes after what), what goes into each argument, the expected order of evaluation, etc. Otherwise this is more of a toy project than an actual kata.

  • Custom User Avatar

    There are no random tests.

  • Custom User Avatar

    Can variables be redefined from mutable to immutable and back? example:

    lang.const.x(10);

    lang.x // 10

    lang.const.x(20);

    lang.x // 10

    lang.let.x(15);

    lang.x // 15 or should it still be 10? and vice versa from let to const

    im aware of how the javascript language works, but with regards to this language we're creating in the kata, it isn't clear how this should behave

  • Custom User Avatar

    I notice your example solution modifes its input. That's a bad habit to get into, and it can bite you when using it as a reference solution for random tests.

    Pay attention to input modification. Your random tests should not be vulnerable to it.

  • Custom User Avatar

    Needs random tests.

    Please read available documention on authoring ( your first ) kata. This mistake could have been avoided.

    Unpublish the kata while reading the docs and adding those random tests, or you will collect downvotes and get retired in the blink of an eye.

    If you have questions after reading documentation, Discord is a good place to get help.