Skip to content
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

Allow uppercase identifiers in Squiggle #3481

Open
berekuk opened this issue Jan 6, 2025 · 1 comment
Open

Allow uppercase identifiers in Squiggle #3481

berekuk opened this issue Jan 6, 2025 · 1 comment
Labels
Language Regarding Squiggle language semantics, distributions and function registry

Comments

@berekuk
Copy link
Collaborator

berekuk commented Jan 6, 2025

Reasons:

  1. We've allowed them by accident in 0.9.0 and 0.9.2, and some models on Squiggle Hub are stuck on those versions.
    • we could handle this manually by emailing authors, but that's annoying to do
  2. We already have String(...), Calculator(...) etc. function on Squiggle.
    • It's possible that after we get structs we could convert these to constructors, but it's hard to tell if that's the case.
  3. The arguments in favor of lowercase-only identifiers are kind of weak:
    • Coding style - other languages (Python, JS) don't do this and they're fine; allowing uppercase is not any worse than allowing camelCase and snake_case
      • OTOH, our error reporting is mediocre and users could get confused
    • Reserving UpperCamelCase for some future feature, e.g. structs - I think for structs we're fine as is; and for some other low-level namespace for those, we could always fallback to weird sigils, e.g. $foo (I don't expect we'll need this though)
@github-project-automation github-project-automation bot moved this to 🆕 To prioritize in Overview Jan 6, 2025
@berekuk berekuk added the Language Regarding Squiggle language semantics, distributions and function registry label Jan 6, 2025
@OAGr
Copy link
Contributor

OAGr commented Jan 7, 2025

I think I'm happy to add them back in. Could become a decent style for custom-made libraries and the like.

@berekuk berekuk marked this as a duplicate of #2561 Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Regarding Squiggle language semantics, distributions and function registry
Projects
Status: 🆕 To prioritize
Development

No branches or pull requests

2 participants