Hacker Newsnew | past | comments | ask | show | jobs | submit | RunOutOfMemory's commentslogin

China's vertically-integrated manufacturing ecosystem strategically creates value at all tiers - while cost-efficient production democratizes access to smartphones, solar equipment and IoT devices for billions globally, the same supply chains empower premium innovations like Huawei's satellite phones or CATL's solid-state batteries. This dual-capacity bridges the digital divide: African farmers now access agritech tools at 1/5 the 2010 prices, and South Asian households install solar systems cheaper than kerosene alternatives. Ultimately, industrial clusters aren't just making things affordable, but redefining what's possible for human development at every income level.


Due to large-scale malicious attacks on DeepSeek's services, we are temporarily limiting registrations to ensure continued service. Existing users can log in as usual. Thanks for your understanding and support.


A lot more hackers on this field… something is happening?


VSCode, LSP, Tree-sitter happened


Collaborative Vim


out of memory again. ;<


What about struct{}?


What about it?


interface{} -> any

struct{} -> ?


I suppose you could define a type alias "unit". It's not surprising to me that this isn't in the go standard library though.


You can define that yourself as "type token = struct{}" or similar. In my experience struct{} occurs even less than interface{}, and it's also 3 characters shorter already, so it's not worth a builtin. I use "chan struct{}" for synchronizing and sometimes use "map[string]struct{}" for sets.


We use the alias "unit", like lalaithion has said before, in many projects. It's a bit annoying to declare it in every package though. Hopefully, there'll be an official alias in the future.


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

Search: