Hopscotch Notation (& Compiler)

a few issues i’d like to discuss

1. custom blocks’ syntax

the current syntax for custom blocks is the following:

custom_rule:
    name: "name of custom rule"
    args: "var1", "var2"
    values: 1, 2
    content:
        # "insert code here"

but thats way too heavy for yall and too expensive to code. im thinking of changing it into one line, what do yall think?

# way 1:
custom_rule."name of custom rule" (var1 = 1, var2 = 2):
    # "insert code here"

# way 2:
custom_rule ("name of custom rule", var1 = 1, var2 = 2):
    # "insert code here"
  • original (strongly not recommended)
  • way 1
  • way 2
  • see my suggestion below
0 voters

special tag: @StarlightStudios

2. spread operator for parenthetical syntax

it works as follow for the assignment syntax:

set_text = ...
    "the spread operator is an indication that the parameters of the block are multiline, so that its more pleasant for the user to read",
    rgb(50, 50, 50)

but how do you do that for the parenthetical syntax? im thinking of this

set_text (...)
    "the spread operator is an indication that the parameters of the block are multiline, so that its more pleasant for the user to read",
    rgb(50, 50, 50)

^^^ but is it intuitive? reply for suggestions

  • it is!
  • its not, see my reply
0 voters

3. multiline math

self.Return = join(
    join(
        Return[0, length(Return) - (recursion * 3 + (recursion - 1))],
        ","[noformat_number[0] == "-"]
    ), 
    Return[
        length(Return) - (recursion * 3 + (recursion - 1)),
        length(Return)
    ]
)

is that kind of code intuitive? ^^ first, im gonna try to make the compiler and interpreter be able to read that, then i can maybe try to work on multilinee wrapping bubbles as suggested by t1. this will take a lot of work so if yall dont like it, i wont bother implimenting that

  • yeah do it!
  • nope its not intuitive and not worth it :|
0 voters

@Cobalt_Phoenix @Nobody @RoadOcean @Petrichor @Heracc @anon48673151 @PeppyWafer21 @William04GamerA @Cutelittlekittycat @creationsofavillager (join taglist here)

8 Likes