Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Global state == shared state if threading (and you probably will be eventually) == a mess.

Global state == lots of refactoring if you want to make your program a library (OpenSSH is a poster child for this).

Write it like it needs to be a library. Write it to be thread-safe. Write it to use async I/O. Do these things and you'll save yourself a ton of work later. Learn to do these well and you'll always do this from the get-go.



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

Search: