-
Notifications
You must be signed in to change notification settings - Fork 9
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
Word synonyms for binary operators #20
Comments
This is definitely an interesting idea. A long while ago (might be in commit history somewhere) I had all the binary operators as words, although more declarative variants. IE you could write However I felt that was a tad too verbose and made code rather more difficult to scan through, so I added the symbol variants. I think the problem is that mathematical expressions are just very difficult to convey in english. I'm definitely open to the idea of adding synonyms, but I do worry that it would make the language more difficult to learn and could potentially be overwhelming(?) |
One idea I had from this (borrowed form Scheme) is you could allow the user to write something like |
You should already be able to do |
Yes, but that incurs another layer of stack recursion. My "redirected definition" idea is like |
The compiler will already inline this when defined as |
Good, I didn't know that. Maybe all that is needed is to add these things to the standard library. |
Yes, I think that was catb0t's original intention. |
Cognate looks really cool. The one place I think the literate aspect can be improved is with the binary operators, which are hard to read in a sentence as prefix symbols.
If the following looks nice, I will make a pull request to add synonyms like this:
and so on,
+
would beAdd
,Inequal?
andEqual?
for!=
and==
, because of the same forWhile (!= "done" Twin Input)
The text was updated successfully, but these errors were encountered: