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

alias and type redefinitions are conceptually the same. int and int_t are conceptually the same. I’m going to assume it’s my type, as defined in the signature of my method you’re calling. If you don’t adhere to the contract then the onus is on you. I’ll check existence, I’ll check conformity, but I won’t check that your string = my string.


> alias and type redefinitions are conceptually the same.

In Go, they are not. Aliases establish precise equivalence between types, type redefinitions establish new types altogether.




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

Search: