Skip to content

Conversation

ararslan
Copy link
Member

@ararslan ararslan commented Apr 1, 2021

When people don't code quote their ranges, markdown will render a specified step size as 👍 or 👎. It does what you want, so why not make it syntax? This PR adds 👍 for a range with positive unit step size and 👎 for a range with negative unit step size.

@ararslan ararslan added parser Language parsing and surface syntax forget me not PRs that one wants to make sure aren't forgotten 😃🍕 and other emoji labels Apr 1, 2021
@matbesancon
Copy link
Contributor

I love it, finally a syntax proposal that will help beginners

Copy link
Contributor

@mkitti mkitti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will make Julia easier to use for emoji oriented users, opening Julia to a new generation.

@Wikunia
Copy link
Contributor

Wikunia commented Apr 2, 2021

Why not add 📈 and 📉 for randomly increasing and decreasing ranges?

@StefanKarpinski
Copy link
Member

Even though this is a joke (I think I can give that away now that it's April 2nd), I can't see much actual harm in doing it. You can still use 👍 and 👎 as identifiers if you want to, they just also parse as infix operators like the word in. It also doesn't prevent them from being used in longer identifiers, just as in being an infix operator doesn't prevent sin or int from being identifiers. So: cute easter egg? Plus kind of a fun range syntax?

@simeonschaub
Copy link
Member

Would be slightly breaking for identifiers containing 👍, but looks like we're fine on that front: https://juliahub.com/ui/RepoSearch?q=%F0%9F%91%8D&r=true

@StefanKarpinski
Copy link
Member

Would be slightly breaking for identifiers containing 👍

Why? I haven't looked it this PR currently breaks that but it's perfectly possible to allow 👍 in identifiers but make 👍 by itself an infix operator. (This is why I used in as my point of comparison.)

@simeonschaub
Copy link
Member

We don't require whitespace around operators, so a👍b is currently a valid identifier, while it would parse as 👍(a, b) with this PR.

@ararslan
Copy link
Member Author

ararslan commented Apr 2, 2021

I should note that space is required around 👍 and 👎 with this PR, since otherwise 1👍2 parses as 1 * 👍2.

We don't require whitespace around operators

Not entirely true: 1in2 also parses as 1 * in2.

@simeonschaub
Copy link
Member

Ah, sorry, I didn't read the PR closely enough then

@vtjnash vtjnash added triage This should be discussed on a triage call and removed forget me not PRs that one wants to make sure aren't forgotten labels Apr 8, 2021
@JeffBezanson JeffBezanson removed the triage This should be discussed on a triage call label Apr 22, 2021
@JeffBezanson
Copy link
Member

Closing as "surprisingly plausible, but still a bit ... much".

@DilumAluthge DilumAluthge deleted the aa/thumbs branch April 22, 2021 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😃🍕 and other emoji parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants