4 ms·
Don't get why people want floating functions. It makes easier to do bad coding and architecture imo. At least you must namespace them;
by rafaelvasco 7y ago
Don't get why people want floating functions. It makes easier to do bad coding and architecture imo. At least you must namespace them;
- goto11 7y agoConsider something like the Math class. In practice it just works like a namespace for math-related functions. The only reason to have a class is because the language requires it. It would certainly be cleaner without having to define a useless class.
- jayd16 7y agoYeah, except I like that Log() isn't already a reserved function name.
- goto11 7y agoI don't think anyone is suggesting the function names should be reserved names. They would still exist in a namespace.
- dragonsngoblins 7y agoI don't really understand how this is significantly different than having a static class with the function
- rafaelvasco 7y agoWell, a static Math class always did make perfect sense to me. Never bothered me. Even after I discovered languages that allow you to define functions everywhere, I still prefer static classes; As long as there's no performance penalties, I'm good. In fact, static classes method calls are really fast;