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

UTF-8 Identifiers #20968

Closed
2 tasks
irww opened this issue Mar 6, 2024 · 3 comments
Closed
2 tasks

UTF-8 Identifiers #20968

irww opened this issue Mar 6, 2024 · 3 comments
Labels
Feature Request This issue is made to request a feature.

Comments

@irww
Copy link

irww commented Mar 6, 2024

Describe the feature

fn main() { σκατ := ' doo, be, shoo, bop, ooh, dee, doo, sha-bam ' δυσκατανοήτων := ' difficult to understand ' println(σκατ) println(δυσκατανοήτων) }

Use Case

UTF-8 identifiers are supported in gcc since 10, Pelles C since 11, MSVC with -utf8 flag.

Proposed Solution

Just add water and stir.

Other Information

V doesn't like UTF-8.

E:\t>v run helloUTF-8.v helloUTF-8.v:3:2: error: invalid character σ 1 | fn main() 2 | { 3 | σκατ := ' doo, be, shoo, bop, ooh, dee, doo, sha-bam ' | ^ 4 | δυσκατανοήτων := ' difficult to understand ' 5 | println(σκατ)

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Version used

V 0.4.4 790ea2f

Environment details (OS name and version, etc.)

Windows 11

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@irww irww added the Feature Request This issue is made to request a feature. label Mar 6, 2024
@JalonSolov
Copy link
Contributor

V is opinionated on many things. One of them that identifiers are ASCII. I don't see this changing.

One of the strengths of V is that anyone can look at anyone else's source and figure out what's going on with the code.

If this change was made, everyone would have to run code through a translator to do that.

@irww
Copy link
Author

irww commented Mar 6, 2024

I do not understand how
σκατ := ' skat'
is more difficult to figure out than
skat := 'σκατ'

Being able to use Unicode standard scientific symbols as variable names (identifiers) is more than useful.
α Right ascension
δ Declination
ε Obliquity of the ecliptic
θ Sidereal time
θο Sidereal time at Greenwich
π Parallax
Φ Geographical latitude
Φ' Geocentric latitude
Δ Distance to the Earth, in AU
ΔΤ Difference ET -UT
Δε Nutation in obliquity
Δψ Nutation in longitude
Θ Geocentric longitude of the Sun

@spytheman
Copy link
Member

That is not going to happen.

@spytheman spytheman closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request This issue is made to request a feature.
Projects
None yet
Development

No branches or pull requests

3 participants