Skip to content

Convert dotless to a submodule#154

Open
T0mstone wants to merge 2 commits intotypst:mainfrom
T0mstone:dotless-module
Open

Convert dotless to a submodule#154
T0mstone wants to merge 2 commits intotypst:mainfrom
T0mstone:dotless-module

Conversation

@T0mstone
Copy link
Copy Markdown
Collaborator

@T0mstone T0mstone commented Apr 18, 2026

This makes more conceptual sense to me, since dotless on its own is meaningless.

This is a breaking change, so three approvals are necessary.

Note that there is no way to do a deprecation for this, but I don't think anyone was using dotless without modifiers anyway.

@Enivex
Copy link
Copy Markdown
Collaborator

Enivex commented Apr 18, 2026

I really don't see the issue with having no top level symbol.

Naming will always be a result of compromises.

If someone truly wishes to write dotless instead of dotless.i, then let them.

@MDLC01
Copy link
Copy Markdown
Collaborator

MDLC01 commented Apr 18, 2026

I think the change I would like instead is to change dotless.i and dotless.j to i.dotless and j.dotless instead. Especially because some symbols that we may want to add in the future are also variation of Latin letters that would benefit from this naming schema (e.g., F.inv for U+2132 Ⅎ, G.inv for U+2141 ⅁, L.inv for U+2142 ⅂, L.rev for U+2143 ⅃).

Of course as of now those would not be accessible in Typst math, but I think it may be sensible to allow the base identifier of a field access to be a single letter in math (the same way the identifier after the period can already be a single letter). @isuffix thoughts?

@Enivex
Copy link
Copy Markdown
Collaborator

Enivex commented Apr 18, 2026

I think single letter identifiers would be a bad idea.

Something like

and therefore
$
 a = b + c.
$

would now presumably be a syntax error.

Your examples could (almost) equally well be inv.F, inv.G, inv.L, rev.L, with the added benefit that all such characters would be grouped.

@T0mstone
Copy link
Copy Markdown
Collaborator Author

Something like

and therefore
$
 a = b + c.
$

would now presumably be a syntax error.

Well, $ alpha + beta = gamma. $ is not a syntax error today, so I wouldn't think so.

@Enivex
Copy link
Copy Markdown
Collaborator

Enivex commented Apr 18, 2026

Fair enough, but I still strongly dislike the idea.

@T0mstone
Copy link
Copy Markdown
Collaborator Author

Well, I strongly dislike having things that work like modifiers before the base symbol name. It's the opposite of consistent.

@Enivex
Copy link
Copy Markdown
Collaborator

Enivex commented Apr 18, 2026

Well, I strongly dislike having things that work like modifiers before the base symbol name. It's the opposite of consistent.

It's impossible to achieve complete consistency. That's why I mentioned compromises above.

And even if you could achieve perfect consistency, that may not necessarily be the most usable option.

@knuesel
Copy link
Copy Markdown
Collaborator

knuesel commented Apr 18, 2026

I also think single-letter identifiers are probably a bad idea and that i in math should be either a letter or a symbol binding, but not "both, it depends...".

@Enivex I can see that the current state can seem no big deal but is there a downside to the proposed change (other than breaking the code of someone that writes dotless instead of dotless.i)? It does seem conceptually more correct...

@MDLC01
Copy link
Copy Markdown
Collaborator

MDLC01 commented Apr 19, 2026

I also think single-letter identifiers are probably a bad idea and that i in math should be either a letter or a symbol binding, but not "both, it depends...".

A single letter can already be interpreted as an identifier, such as i in dotless.i. So it already depends on the context.

@MDLC01 MDLC01 added the waiting on reviews Breaking and non-breaking changes need respectively 3 and 2 reviews label Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting on reviews Breaking and non-breaking changes need respectively 3 and 2 reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants