Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xal
on April 23, 2014
|
parent
|
context
|
favorite
| on:
Go 1.3 beta 1 released
I tend to use map[string]interface{} when I need a set. It works okay.
farslan
on April 23, 2014
|
next
[–]
struct{} is better because it doesn't do an allocating. See:
https://github.com/fatih/set/blob/master/set_ts.go#L18
cespare
on April 23, 2014
|
prev
[–]
Why interface{}? You're storing a value (and using space for it) that you don't need.
Consider applying for YC's W25 batch! Applications are open till Nov 12.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: