-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
misc problems with number literals #17504
Comments
@JohnAD thanks for your PR #17020, even though it was taken over and further improved, the feature would've probably taken much longer to implement without your work! I've migrated remaining issues to here for clarity for bug 1:you mentioned earlier:
that would be super helpful (for bug 1 above); otherwise it's painful to read/write code with this new feature as syntax highlighting is messed up. Sublime NimLime would be great start note that github syntax highlighting is based on it, so if NimLime is fixed, fixing github could be a simple PR away. links
|
You misuse the term "bug". You mean problems/issues/possible improvements/difference in taste. |
Started work on Sublime NimLime filter: nim-lang/NimLime#153 |
changed to s/bug/problem/ of these, the only potential "difference in state" would be |
I imagine problem 7 is a breaking change on many legacy libraries in nimble/etc. Just curious: is there a plan for Nim 2.0 in the future; or is that too far away? If one is coming out in the next year or so, this could be queued up with other desired-but-breaking changes. (And nimble.directory could be modified so that 1.x and 2.x lookups are using different datasets.) |
a deprecation is not a breaking change, it helps with code migration with the usual In any case, there's no need IMO to wait for a hypothetical nim 2.x (let alone next year) to do such changes, nim has Note also that |
update:
|
update: github now renders number literals correctly (the latest linguist release includes github-linguist/linguist#5306 which was merged) |
Problem 4 was an unrelated problem fixed in #22076 Problem 3 is unsolveable and not relevant anymore after having it in 2.0 Problem 6 and 7 are RFCs (and not particularly useful ones) and since we stale RFCs now it can be independent of this issue As listed above most things support it now including my instance of VS Code (not playground but that's playground's problem), and that's problem 8 Moving problem 2 into own issue (#22534) and closing as completed |
list of remaining unfixed issues from the 11 ones mentioned in #17020 (comment)
problem 1
problem 2
nim doc renders badly
the syntax highlight of
`'wrap`
is bad:see
Note: the relevant code to fix is in lib/packages/docutils/highlite.nim eg:
problem 3
unless we backport this and upgrade csources, we won't be able to benefit from this in stdlib modules used by bootstrap (dependencies of koch, compiler, etc), and using it in other stdlib modules would make
--useversion:1.2|...
unusuable becausewhen false
,runnableExamples
,{.since: (1,5,1).}
etc cannot protect from lexer/parser errors.However this can be largely mitigated by nim-lang/RFCs#348 (which itself needs to be backported including to csources/csources2)
problem 4
we can't use a literal proc in quote do:
this is possibly a consequence of limitation of method call syntax (can't use MCS inside templates)
problem 5
defined(nimHasCustomLiterals)
=> followup custom literals #17500
problem 6
we should turn the builtin
123'f64
+ friends into non-builtin reusing this feature so that compiler logic simplifies, this could be possible as follows:problem 7
logical step after bug 6: deprecate literals without apostrophe, eg:
deprecated
12f
,12i32
etc(nim-lang/RFCs#216 also recommended deprecating those)
problem 8
Additional Information
1.5.1 355985a
The text was updated successfully, but these errors were encountered: