-
-
Notifications
You must be signed in to change notification settings - Fork 473
Code examples: Tweak the first example ("Functions"), and add a new "Multiple Dispatch" example #2415
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
base: main
Are you sure you want to change the base?
Conversation
|
Once the build has completed, you can preview your PR at this URL: https://julialang.netlify.app/previews/PR2415/ in ~15 minutes |
|
EDIT: I've implemented this. Slide 1 is now titled "Functions", and I've added a Slide 2 titled "Multiple Dispatch". |
…ond slide on "Multiple Dispatch" using the cats and dogs example
|
Needs vertical space after the prompt returns. |
Done |
|
It didn't change here, but for the first one it strikes me now that
And I'd add this to the end of the multiple dispatch one |
Done! |
Done! |
Done. I've changed the title to "Straightforward syntax", but I'm open to bikeshedding it. |
|
"Straightforward syntax" sounds like a bit of tongue twister to me, and maybe sounds (subjectively) a bit defensive as the first thing one sees in the carousel. "Clear & Readable Syntax", "Easy & Natural Syntax", or some other combination of those adjectives, would sound better IMO. (I'm using the ampersand to match the other example titles so that they all feel coherent.) |
|
What if we do the following:
|
Yeah, it also requires scrolling for me. Hmmm. Should we make the "terminal" taller? |
|
Whatever the first one is called should be defendable as "the first thing we want to show off is our great X" "The first thing we want to show off is our great string interpolation" doesn't make sense IMO. Regarding the layout, I saw it as a pro that it's a little off screen. Promptes scrolling. Design by committee is hard. |
|
I think "multiple dispatch" is a good choice for "first thing we show off", but I think the dog/cat example is better for showing that. |
|
Bikeshed, but I don't think multiple dispatch is a great selling point for Julia. I'm myself of the opinion that it's wildly overrated, but even to those who love it, its advantages are not visible in a small example. People who haven't already bought in don't know why they should like MD. Instead, I'd have a cool unicode + math + broadcasting example to attract the Matlab crowd, or else a multithreading or a "performance" example (low-level optimisation or a performance-critical for loop) |
|
I would generally agree that people come to Julia for things like performance, ease of use, package ecosystem etc. Multiple dispatch is what they discover and learn (and perhaps even love), but is not why they come. I think it is good to have an example for multiple dispatch in the rotation, but we could definitely have more end-user exciting features in the first 2-3 examples in the carousel. |


Preview URL: https://julialang.netlify.app/previews/PR2415/
Inspired by this Discourse thread.
For Slide 1:
greet()on separate lines (inspired by this Discourse comment).greet()more different from each other, to make it easier to quickly notice the visual difference.For Slide 2: