Hacker News new | ask | show | jobs
by ir193 1653 days ago
I was trying to write some function similar to `make` but in vein. Maybe I need to open the compiler like the author did. make() takes a type as argument but you can't define such functions in go. And `make` itself is not a keyword, how does golang implement it? is it a special case?
1 comments

Its a special case, yes. You could probably find something like `makeFn` in `runtime` internal code.