logoalt Hacker News

repelsteeltjelast Monday at 8:30 AM3 repliesview on HN

That sounds like your answer is: "Yes, global variables".

That may be a perfectly good solution in many embedded environments, but in most other context's global variables are considered bad design or very limiting and impractical.


Replies

TuxSHlast Monday at 10:29 AM

> global variables are considered bad design

Global mutable variables, and they usually tend to be grouped into singletons (solving initialization issues, and fewer people bat an eye)

izacuslast Monday at 9:06 AM

They're considered impractical mostly because language tooling doesn't support them appropriately.

show 1 reply