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

9th slide should use None in the scala example #1

Open
sakoht opened this issue Oct 3, 2016 · 2 comments
Open

9th slide should use None in the scala example #1

sakoht opened this issue Oct 3, 2016 · 2 comments

Comments

@sakoht
Copy link

sakoht commented Oct 3, 2016

To make an equivalent comparison between Scala and Rust, this line on slide 9:
var y: Option[Int] = _

Should read:
var y: Option[Int] = None

Like it does in Rust. And it will not blow up.

@koeninger
Copy link
Owner

No, they aren't equivalent, that's the point. Options in scala can still be
null.

On Oct 2, 2016 8:55 PM, "Scott" [email protected] wrote:

To make an equivalent comparison between Scala and Rust, this line on
slide 9:
var y: Option[Int] = _

Should read:
var y: Option[Int] = None

Like it does in Rust. And it will not blow up.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAGAB8i1sN_RhzBHrOopCSFZOF0j5e6pks5qwGCigaJpZM4KML07
.

@sakoht
Copy link
Author

sakoht commented Oct 4, 2016

Ah so in Rust I can't set an option to equal ptr::null()?

It seemed like that was the Rust equivalent to foolishly assigning null instead of None to an Option in Scala.

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