Hacker News new | ask | show | jobs
by tptacek 1921 days ago
Either strings or (in the common case where I know I'm dealing with v4) uint32's. In fact, I probably do v6 stuff with uint32s too (I'm never working with an arbitrarily large v6 prefix).

I think this post is right about net.IP, though I also think the solution they've reached is Lovecraftian. But I write Rust, too, and I'd take net.IP over Sockaddr any day of the week.

1 comments

I assume you mean std::net::SocketAddr? Out of curiosity, what's wrong with it?
I'd assume the lackluster selection of operations and how deeply nested some of the information is within the type. Definitely not the most ergonomic thing.

My personal favorite is probably the python ones. Only annoyance is difficulty of creating modified objects from existing ones.