-
-
Notifications
You must be signed in to change notification settings - Fork 11
Add bowties and deprecate join
#93
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
base: main
Are you sure you want to change the base?
Conversation
Whoops, we use "big" and not "large" for these.
Ugh this is unfortunate. There is no way of deprecating the mai' variant of a symbol. What you did will show a warning for all variants of |
Remove the top level symbol and create a new variant for default fallback, then mark that as deprecated instead |
With the way things are implemented, I fear this may not warn at all. Warnings are hard to reason about when it comes to symbols. I'll think about this tomorrow. |
That is entirely intentional, as they would be removed and replaced by variants of |
Great then! |
It's somewhat unfortunate that l and r are used for entirely different things within the same symbol. But I guess it's unavoidable. |
join ⨝ | ||
.r ⟖ | ||
.l ⟕ | ||
.l.r ⟗ | ||
bowtie | ||
.stroked ⋈ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more sense to just put this at the top level (without stroked), unless there are additional variants not included here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I had originally, but my thinking was that it makes more sense to keep .stroked
when there's also .filled
. That's also how it is for e.g. hourglass
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we aren't entirely consistent (which we ideally should improve upon), but in my mind it makes more sense when there is no canonical variant. In this case the stroked one is the canonical variant, and stroked
just serves as extra noise.
Not to mention the big variants are variants of the stroked ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember that it's not required. Since stroked
is the first variant, bowtie
is automatically a shorthand for bowtie.stroked
. A part of me thinks that users could be confused when some symbols only have stroked
available as a modifier and some only have filled
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember that it's not required. Since
stroked
is the first variant,bowtie
is automatically a shorthand forbowtie.stroked
. A part of me thinks that users could be confused when some symbols only havestroked
available as a modifier and some only havefilled
.
I know that it's not required, but I don't think that's a good reason to add unnecessary modifiers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have .stroked we should have it for everything that is not filled
I really don't agree. Stroked and filled are used essentially as our versions of "white" and "black" in unicode naming.
It makes perfect sense to have both stroked and filled when there is no canonical version of the symbol.
In this case the regular bowtie symbols are canonical, and the filled ones are exceptional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice how the unicode names mention "black" specifically, but not "white" for the regular ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't want the added complexity of enshrining a "canonical version" for some symbols by means of omitting certain modifiers for them. That's another data point users will have to remember and seems like a totally unnecessary restriction. It's conceptually so much simpler to just have both modifiers for everything with those two styles, whether one of them is canonical or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say that having .stroked is more
complexity, not less. Why should I have to arbitrarily have to remember which operators get the stroked
, only because they have a filled
variant? I do not like relying on fallback, because it's unpredictable and brittle to codex changes. Almost everyone who want these symbols will want the .stroked
variants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like relying on fallback
But fallback is a feature. If you choose not to use it, then of course you may have to specify annoying modifiers.
My view is that most changes do not affect fallbacks. When they do, we should be careful about it. And we should have a way to specify which fallbacks can be relied on, and which cannot (e.g., with the minimal modifier set proposal I link everywhere).
I think it's unambiguous enough as long as we don't have |
Compared to the old
Edit: though I would also prefer not including
|
This is problematic both because we're trying to get away from join, and because it would be counter to every other n-ary operator (which we use |
I've added I've also changed the order so that |
You also need to change the deprecation message |
Not changing that was actually intentional. My thinking was that suggesting the full version might lead to worse UX since users may not know that the |
Well, that is the full name of the symbol. I think every other deprecation message so far has used the full name. |
I'm also fine with changing it (the deprecation message). What do the others think? |
I think we should suggest the simplest version of the name that we know we won't break in the near future. In this case, this would be without Fallback is a feature. It has many drawbacks, but there are also some cases where it makes sense to use it. I would argue this is on of them. |
This is a necessary preliminary step to unblock #26, see also #26 (comment).
I went with slightly different names from what's in the Proposals Document draft since
.l
and.r
already have a use for the big operator, so using them entirely for filling felt wrong. I think the way they're called here is a better alternative.The big ones don't have filled variants afaik, so I don't think defining them with a
.stroked
modifier as well makes much sense. Thus, it's now a trichotomy for this symbol: stroked, filled, or big.As for the deprecation: I'm thinking of the process we discussed some time ago for stuff like this: Deprecate the original and add the new name in one typst version, then undeprecate and change the original name to the new symbol in the next typst version.