Hacker News new | ask | show | jobs
by justinlivi 3671 days ago
As someone who's never coded in either go or nim, this seems to me to be the exact opposite ideology of golang. The metaprogramming is very cool, but I imagine sharing a code base that utilizes it heavily is a nightmare.
2 comments

It can be or it can make it easier.

For example, decorators and context managers can do very similar things but make things easier in many cases in Python.

The difference is you or your team have the option to use the magic in moderation vs no magic at all.
I think only time can tell if that sort of argument works. Your team's habits matter, but so does the rest of the ecosystem. Strangers with libraries too central to ignore might end up forcing inscruitable templates and macros on you.

As far as I can see, the Python community has done a pretty good job of using magic sensibly. The Ruby and C++ communities, not so much.

Yes time will tell. Its basically like giving someone Jedi powers with the risk they could fall to the dark side while Golang is like Han Solo just getting things done in a much less sophisticated yet practical manner.
To be fair, "magic in moderation" is subjective. It may seem to be moderate until you have a new dev that is struggling to spin up on the codebase.