Show HN: KatLang – Language for Calculations
katlang.org
Show HN: KatLang – Language for Calculations
1–10 of 46 posts
Re: Show HN: KatLang – Language for Calculations
#2Re: Show HN: KatLang – Language for Calculations
#3Curious about the syntax of function declaration - i.e.:
A = x * y + x
And then I invoke it by: A(2, 3)
Implicitly using the order of which the parameters were used in the function declaration.Rather than having it explict either via:
A = (x, y) => x * y + x
Or via named parameters: A(x = 2, y = 3)
Why this design?Re: Show HN: KatLang – Language for Calculations
#4Looks good. Curious about the syntax of function declaration - i.e.: A = x * y + x And then I invoke it by: A(2, 3) Implicitly using the order of which the parameters were used in the function declaration. Rather than having it explict either via: A = (x, y) => x * y + x Or via named parameters: A(x = 2, y = 3) Why this design?
Re: Show HN: KatLang – Language for Calculations
#5Re: Show HN: KatLang – Language for Calculations
#6I wonder why no (proper) https?
Re: Show HN: KatLang – Language for Calculations
#7Looks good. Curious about the syntax of function declaration - i.e.: A = x * y + x And then I invoke it by: A(2, 3) Implicitly using the order of which the parameters were used in the function declaration. Rather than having it explict either via: A = (x, y) => x * y + x Or via named parameters: A(x = 2, y = 3) Why this design?
Re: Show HN: KatLang – Language for Calculations
#8I wonder why no (proper) https?
Re: Show HN: KatLang – Language for Calculations
#9Looks good. Curious about the syntax of function declaration - i.e.: A = x * y + x And then I invoke it by: A(2, 3) Implicitly using the order of which the parameters were used in the function declaration. Rather than having it explict either via: A = (x, y) => x * y + x Or via named parameters: A(x = 2, y = 3) Why this design?
I was obsessed with the perfect syntax. Declaring method parameters in method parameters list is redundant, because the parameters appear in the method body anyway. This approach is not the best in all situations, but for short expressions, like lambda expressions, it is perfect (in my opinion). Check my paper on comparing lambda expression implementation: https://www.bjmc.lu.lv/fileadmin/user_upload/lu_portal/proje.…
A = x * y + x
A = y * x + x
It is an interesting subject, and in general you would want to balance usability, people's expectations, and succinctness.Re: Show HN: KatLang – Language for Calculations
#10Looks good. Curious about the syntax of function declaration - i.e.: A = x * y + x And then I invoke it by: A(2, 3) Implicitly using the order of which the parameters were used in the function declaration. Rather than having it explict either via: A = (x, y) => x * y + x Or via named parameters: A(x = 2, y = 3) Why this design?
I expected `A(x, y) = x * y + x`, in line with standard mathematical function notation.