-
Notifications
You must be signed in to change notification settings - Fork 1k
Rewrote unified types tour #708
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
unified-types: | ||
dot -Tsvg unified-types-diagram.dot -o unified-types-diagram.svg | ||
type-casting: | ||
dot -Tsvg type-casting-diagram.dot -o type-casting-diagram.svg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ls *.dot | entr make $1 # Choose either unified-types or type-casting (see Makefile) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
digraph UnifiedTypes { | ||
node [fontname = "Courier"]; | ||
rankdir="BT" | ||
|
||
|
||
Byte -> Short; | ||
Short -> Int; | ||
Int -> Long; | ||
Long -> Float; | ||
Float -> Double; | ||
Char -> Int; | ||
|
||
{rank = same; Double; Float; Long; Int; Short; Byte; } | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
digraph UnifiedTypes { | ||
node [fontname = "Courier"]; | ||
rankdir="BT" | ||
AnyVal -> Any; | ||
"AnyRef (java.lang.Object)" -> Any; | ||
|
||
Double, Float, Long, Int, Short, Byte, Unit, Boolean, Char -> AnyVal; | ||
List, Option, YourClass -> "AnyRef (java.lang.Object)" | ||
|
||
Null -> {List Option YourClass} | ||
"Nothing" -> {Double, Float, Long, Int, Short, Byte, Char, Unit, Boolean, Null} | ||
|
||
{rank = min; "Nothing"} | ||
{rank = same; Double; Float; Long; Int; Short; Byte; Char; Unit; Boolean; List; Option; YourClass} | ||
{rank = same; "AnyRef (java.lang.Object)"; AnyVal} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This graph is misleading or incomplete in numerous ways, including
As it stands the graph is worse than nothing. It's really important to get this stuff right to start people off with an accurate mental model instead of a bunch of misconceptions that have to be unlearned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the graph is misleading; some ellipses or other indication of what's missing would be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the graph is still useful to give users a global picture of what is written in this page. But I agree with point 1. of @Ichoran.