News for hackers. Stuff that matters.
Re:Lily: An interpreted language with a focus on expressiven... by staticassertion on Thursday July 19, 2018 @09:56PM (#17571885)
Rust makes a similar decision, despite having Option and Result.

If you want the Option behavior, there's .get()

Anyways, very cool looking language.

Re:Lily: An interpreted language with a focus on expressiven... by Ar-Curunir on Friday July 20, 2018 @12:10AM (#17572391)
But from what I've seen, most idiomatic Rust code doesn't use the `map[key]` syntax, but instead uses `map.get(key)`.
Re:Lily: An interpreted language with a focus on expressiven... by steveklabnik on Friday July 20, 2018 @05:08AM (#17573518)
We must look at very different code :)
Re:Lily: An interpreted language with a focus on expressiven... by bpicolo on Friday July 20, 2018 @11:11AM (#17575614)
I actually didn't realize it was doable (not a heavy rust user - just an enthusiast). Kinda hidden away in docs under an example [0] and isn't in the book under hash maps [1]. Might be worth calling out somewhere explicitly? People getting started with rust probably aren't familiar with the trait-based operator overloading system yet.

[0] https://doc.rust-lang.org/std/collections/struct.HashMap.htm... [1] https://doc.rust-lang.org/book/second-edition/ch08-03-hash-m...

Re:Lily: An interpreted language with a focus on expressiven... by steveklabnik on Friday July 20, 2018 @03:04PM (#17577898)
Yeah, might be worth it on the API docs, for sure. Maybe file a bug? :)