Hacker News new | past | comments | ask | show | jobs | submit login

This is a super interesting read! Having come into Rust from an experience with mostly object-oriented languages (Python, Java, C++), what you seem to have taken for granted, I found surprising and new, and what you are surprised by (such as self parameters), I found quite normal. It's great to see the other side of this.



I've actually written a ton of python too. The self parameter didn't confuse me because of OO, but because traits can actually dispatch on the types of all of their arguments so it wasn't clear to me what the meaning of the self argument was and how much it should affect my design.

Manishearth cleared up most of my confusion - it affects namespacing and auto-borrow but doesn't interact with constraints. Traits are very similar to typeclasses and I was just thrown by the surface level syntax.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: