- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.7k
RFC: Show symbols with a colon #1459
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
Conversation
| I am also unaware of any problems this would cause, but, barring that, I think this change would make symbols more clear to newcomers. This style of showing is what Ruby does, for example. | 
| I've wanted this for a long time but @JeffBezanson had some objection, possibly the stringification business which t seems you've addressed here. So if he's cool with it, I'm all for. Thanks for doing this, btw. | 
| My objection is this: The syntax for calling  | 
| Is that a constructed julia output? Because with the code in this pull request I get which seems pretty much ideal to me. The reason that this works is that when passing an  So, if it weren't for the distinction between  | 
| Ah, I got that output by applying only the change to  | 
RFC: Show symbols with a colon
) Stdlib: LinearAlgebra URL: https://github.com/JuliaLang/LinearAlgebra.jl.git Stdlib branch: master Julia branch: master Old commit: d568106 New commit: 7e11b5e Julia version: 1.13.0-DEV LinearAlgebra version: 1.13.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/LinearAlgebra.jl@d568106...7e11b5e ``` $ git log --oneline d568106..7e11b5e 7e11b5e Add `AbstractArray` conversions for `AbstractQ` (#1470) 52c41f7 Add missing methods to `diagind` documentation (#1473) 28ee87e Overload array constructors for BunchKaufman (#1461) (#1466) 6f73f65 Add 'eigmin'/'eigmax' methods for 'Eigen' (#1468) 7b21cab Use `Iterators.rest` within `generic_norm` to simplify code (#1459) 57ac0eb Make `parentof_applytri` fully type-stable (#1243) 880a9fe Add `_sym_uplo` to skip validation (#1441) 8d6ca14 Public function to access the `uplo` for `Symmetric`/`Hermitian` (#1440) 7a4b27e Make `dot` with Bool-arrays type-stable (#1456) 6fe77f8 Make `dot` with Bool-arrays type-stable 5af75df Remove zeroing in `similar` for `Hermitian` (#1455) 5685390 Index into diag in `Tridigaonal` * `Diagonal` (#1454) 51923a5 Forward structure-preserving broadcasting to diag for `Diagonal` (#1423) 35a4427 Iterator norm in `isapprox` for `Array`s (#1378) 98723df Structured broadcasting for UpperHessenberg (#1325) ``` Co-authored-by: IanButterworth <1694067+IanButterworth@users.noreply.github.com>
Currently, symbols show without a colon:
This patch changes it to
printstill produces the raw name when you need it, and thusstringdoes as well.I think this change would improve clarity. I put an RFC in the title because I wasn't sure if there's a reason that this hasn't been implemented already. Thoughts?
Btw, I built this patch on top of #1458, since I thought that one would be less controversial. If there's interest for a patch only changes
showfor symbols, I could fix that easily.