4 ms·
> - I have to use every variable I declare, otherwise it won't compile (b/c golang authors decided this produces better code) > - There is no built in map or r
by jjuliano 6y ago
> - I have to use every variable I declare, otherwise it won't compile (b/c golang authors decided this produces better code)
> - There is no built in map or reduce function. You're expected to use for loops everywhere because it is more explicit
Go is an imperative language, where no implicit magic happens on the background, like auto creation of resources on runtime, every sequence needs to be manually defined by the programmer. "With imperative code, you’re telling your program how to do something. And with declarative code, you’re telling your program what you want to do. - Tyler Mcginnis, React Fundamentals", depends on the programmer, but I like to be in control.
- unityByFreedom 6y agoYeah I get that. I prefer declarative code. I really enjoy constraint programming, for example, which is anything but imperative. I had no idea there were folks who preferred imperative languages until I discovered the Go community. I always figured people choose imperative languages for lack of familiarity with more declarative ones.