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

Hello World as first exercise - is it OK to introduce Option so early? #251

Closed
petertseng opened this issue Jan 29, 2017 · 6 comments
Closed

Comments

@petertseng
Copy link
Member

Hello World is our first exercise. It introduces Options.

exercism/problem-specifications#290 (comment)

Ian said it best:

Some/None. Really? We did that in Hello World?

Is it too much of a hurdle for students to get over, or are students usually good enough at looking up https://doc.rust-lang.org/std/option/ that they can figure it out?

If anyone has evidence to share one way or the other, I'd be pleased if you could help by sharing it. I'd also like to know because the Haskell track also wants to add hello-world (exercism/haskell#475)

@petertseng
Copy link
Member Author

Question you might ask: "If we for some reason decided to remove hello world, when would Option be introduced again?"

I believe the answer is when we use Result in hamming. Not exactly Option, but close enough.

@ErikSchierboom
Copy link
Member

Speaking for myself, I think I'd be rather confused if hello-world would be the first exercise. Options are not that difficult, but leap for example is easier I believe. But then again, I'm perhaps not the average Haskell programmer.

@petertseng
Copy link
Member Author

petertseng commented Jan 29, 2017

If anyone has evidence

Well, uh, I have stats? Here are some languages that either do or could ostensibly use option/maybe/non-nullable reference types/whatever analogous concept in their hello world tests:

Do not have hello world:

Have hello world:

For the following tracks, including their stats in the comparison would not be a direct comparison against the above languages because:

  • ceylon (would use non-nullables, but this track is not active)
  • crystal (types are non-nullable, but they use default arguments in their hello-world)
  • scala (has Option, but all reference types are still nullable, and uses default arguments in hello-world)
  • swift (types are non-nullable, but they use default arguments in their hello-world)

You know what? I honestly don't know if there are interesting insights to be gained from these stats, but I'll post them here anyway in case anyone does see anything interesting!

@ErikSchierboom
Copy link
Member

The F# track also uses optional values.

@petertseng
Copy link
Member Author

petertseng commented Jan 29, 2017

Embarrassing that I forgot it. Added to list.


I also didn't realize so many languages were doing this. Maybe I should have asked in a more general place, rather than the Rust track. I only knew that Rust was using option, and didn't do my research to see that other tracks were as well.

@petertseng
Copy link
Member Author

We can talk about this in exercism/problem-specifications#520

by the way I missed purescript - they also use option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants