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

[docs/base] add a type tree for Number #45975

Merged
merged 5 commits into from
Nov 3, 2022

Conversation

inkydragon
Copy link
Member

@inkydragon inkydragon commented Jul 9, 2022

ref: #24741

Generated using the following code with manual modifications

  • Sort by type size
  • Move AbstractIrrational to the end
using AbstractTrees
AbstractTrees.children(x::Type) = subtypes(x)
print_tree(Number)

preview
image

JuliaLang#24741

Generated using the following code with manual modifications
```jl
using AbstractTrees
AbstractTrees.children(x::Type) = subtypes(x)
print_tree(Number)
```
@inkydragon inkydragon added the docs This change adds or pertains to documentation label Jul 9, 2022
@fredrikekre
Copy link
Member

Can you add a blurb before the tree that describes what it shows? Does it make sense to also add an indication which ones are abstract types since the Abstract* prefix is not used for all abstract number types?

@inkydragon
Copy link
Member Author

Any more comments?

@@ -2,6 +2,37 @@

## Standard Numeric Types

A type tree for all subtypes of `Number`.
Copy link
Member

@oscardssmith oscardssmith Aug 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this "for included number types`"

@mkitti
Copy link
Contributor

mkitti commented Aug 4, 2022

Should we mark which types are primitive or struct types?

Marking primitives seems noisy. Perhaps we should just mark struct types and indicate the rest are primitive types?

The struct types according to isstructtype are:

  • BigFloat
  • BigInt
  • Irrational
  • Rational

@KristofferC KristofferC added the merge me PR is reviewed. Merge when all tests are passing label Nov 2, 2022
@DilumAluthge DilumAluthge merged commit bfb0098 into JuliaLang:master Nov 3, 2022
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Nov 3, 2022
@inkydragon inkydragon deleted the doc-base branch November 3, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants