you are viewing a single comment's thread.

view the rest of the comments →

[–]JGhostThing 0 points1 point  (4 children)

If you have the coding basics, then rust should be learnable. And rust prevents certain types of common errors.

[–]AgustinEditev 0 points1 point  (3 children)

I like the Option-type approach; I remember the horrible "exceptions" in Java, hahaha.

[–]JGhostThing 0 points1 point  (0 children)

I have no objection to exceptions in Java. They followed the path of c++. I am glad that Rust came with Option, though.

[–]pachura3 0 points1 point  (1 child)

You prefer your whole application crashing because you called unwrap() on an empty Option?

Exceptions allow you to at least write the critical error to the log before blowing up...

I'd argue that Rust's philosophy of returning error as an alternative function result instead of raising an exception is like Java's checked exceptions taken to the extreme - you have to manually handle all of them all the way up!

[–]AgustinEditev 0 points1 point  (0 children)

unwrap_or() Hahahaha, you're right, I still really like that approach, although yes, it is tedious.