pyth
pyth copied to clipboard
Rearranging orders of operations to put potential input last
I'd like to accumulate a list of all functions that we should swap the order of operations on to allow the use of implicit Q
more often. Starting list:
-
@<col><int>
-
c<str><str>
-
i<col><int>
-
j<col><int>
-
r<str><int>
-
.:<col><int>
-
.x<any><any>
-
.c
,.C
,.P
I'm not sure about these:
-
x<col><col>
-
X
This is actually a good reason to keep the lambdas ones the way they are now instead of switching them like we were planning. Maybe keep some like m
and switch say f
.
I'd much prefer that they all go the same way, for learnability.
This isn't "switching" them per-say, but I feel like the default value on q
should be removed or moved to something else after implicit Q
has been added, since I find myself wanting to compare with the input fairly often.
That's a good point, I'll change that now. This is a good place to accumulate additional examples like that one.
Also, .>
and .<
I just realized that we don't have to necessarily have to switch the input order to have he order that they fill up in switch. For example: @3
could expand to @Q3
.
That's an interesting idea - I like anything we can do to increase backward compatibility while getting the same advantages.
On Sun, Jun 12, 2016 at 11:54 PM Maltysen [email protected] wrote:
I just realized that we don't have to necessarily have to switch the input order to have he order that they fill up in switch. For example: @3 could expand to @Q3.
— You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/isaacg1/pyth/issues/187#issuecomment-225484552, or mute the thread https://github.com/notifications/unsubscribe/ARXYrtJdhaOxK_hdu9oX20Oz2UwnP88oks5qLNR1gaJpZM4H_0Qb .
Wouldn't that complicate the parser more? You need to detect you're at eof, and that you were parsing a @
(i.e. @hT
)