News for hackers. Stuff that matters.
Re:Rust for Python Programmers by swah on Wednesday May 27, 2015 @09:22AM (#9611112)
Do Rust newbies also complain about the lack of exceptions like in Goland (myself included even understanding their reasons..) ?
Re:Rust for Python Programmers by pjmlp on Wednesday May 27, 2015 @09:28AM (#9611146)
No because Rust offers a more natural way to deal with them, instead of ifs everywhere.

Also known as railway programming in FP circles.

Re:Rust for Python Programmers by platz on Wednesday May 27, 2015 @10:12AM (#9611427)
> railway programming in F# circles

FTFY

Re:Rust for Python Programmers by unmole on Wednesday May 27, 2015 @11:23AM (#9612005)
Pretty sure pjmlp meant Functional Programming.
Re:Rust for Python Programmers by platz on Wednesday May 27, 2015 @11:28AM (#9612043)
"Railway Oriented Programming" is a term coined by Scott Wlaschin, a prominent F# practitioner who popularized the term with helpful blog posts, slides, and speaking events.

Outside of the F# community (i.e. those that have not seen Wlaschin's materials) however, the term is rarely used. The larger FP community has more more general terms they use instead for the whole class of patterns surrounding this.

Re:Rust for Python Programmers by pjmlp on Wednesday May 27, 2015 @12:54PM (#9612693)
You are correct. I just thought the term was more widely known outside the F# world.
Re:Rust for Python Programmers by platz on Wednesday May 27, 2015 @01:01PM (#9612743)
well it could be, I certainly don't speak for everyone; just haven't seen it personally myself yet.
Re:Rust for Python Programmers by bad_user on Wednesday May 27, 2015 @01:41PM (#9613042)
Rust's error handling is pretty good. First of all you see in the signature of the function that it can trigger an exception, so such a function will return Result<T, E> instead of just T. This is similar to Option, Either or Try in Scala, or to Maybe / Either in Haskell. To easily pipe such errors, Rust provides a try! macro, which just expands into a catch block.

Rust is less functional than Haskell or Scala, so I don't know how that works out, but in FP languages it ends up working great. Also, compared with Go it isn't the same thing.

Re:Rust for Python Programmers by moonchrome on Wednesday May 27, 2015 @09:48AM (#9611275)
Rust targets C++ programmers (Go seems to be targeting Python/Ruby web devs), the former are used to not using exceptions even when they exist in the language (for various reasons, some valid - some not so much :) )