4 ms·
Yes, this is a terrible idea - it violates referential transparency, which is a property that is always worth working towards, imo. I can't think of a reason to
by ocharles 11y ago
Yes, this is a terrible idea - it violates referential transparency, which is a property that is always worth working towards, imo. I can't think of a reason to justify breaking that property in this scenario.
- vox_mollis 11y agoThat can be mostly avoided by naming things correctly. uuid_generator would be far less likely to be misused than u. For whatever reason, however, descriptive variables are not very popular in the Go community.
- LukeShu 11y agoSure, but .String() wouldn't be a good method for uuid_generator to use to generate a new UUID--String() should be a string representation of the thing; it says "this is a string of me". Which is where the confusion would come from.