isaacg1 / pyth

Pyth, an extremely concise language. Try it here:
https://pyth.herokuapp.com/
MIT License
263 stars 57 forks source link

Rearranging orders of operations to put potential input last #187

Open isaacg1 opened 8 years ago

isaacg1 commented 8 years ago

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:

I'm not sure about these:

Maltysen commented 8 years ago

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.

isaacg1 commented 8 years ago

I'd much prefer that they all go the same way, for learnability.

Maltysen commented 8 years ago

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.

isaacg1 commented 8 years ago

That's a good point, I'll change that now. This is a good place to accumulate additional examples like that one.

isaacg1 commented 8 years ago

Also, .> and .<

Maltysen commented 8 years ago

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.

pyth-watcher commented 8 years ago

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 notifications@github.com 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 .

vendethiel commented 8 years ago

Wouldn't that complicate the parser more? You need to detect you're at eof, and that you were parsing a @ (i.e. @hT)