4 ms·
> I mean, the easy solution is don’t use Python :) People will be much better off and happier if they switch to Go for 99% of tasks. I’ll understand if it’s p
by asylteltine 3y ago
> I mean, the easy solution is don’t use Python
:)
People will be much better off and happier if they switch to Go for 99% of tasks. I’ll understand if it’s python for machine learning.
- whalesalad 3y agoGo is such an ugly language. It has it’s place but it’s not the end-all be-all.
- asylteltine 3y agoHow? It’s SO easy to read and you don’t need semicolons. How can it possibly be ugly?
- sgarland 3y agoif err != nil
- smegsicle 3y agoas opposed to...
- asylteltine 3y agoYes and? Do you not check return values? Pythons allows you to just yolo call a function lmao. It’s awful. You can NEVER guarantee behavior with Python. Never. Go error checking is guaranteed to be either an error type or in the absolute worst case, a nil pointer panic.
- sgarland 3y agoThe question was "how can Go be ugly," which is subjective. I find Go's error handling verbose and ugly. Re: guaranteed behavior, correct me if I'm wrong, but for anything in stdlib, you'll either get the expected return value or an exception. For example, checking an array with str.isdigit() isn't undefined if the array has a None, it raises AttributeError. But yes, you can just yolo things and hope for the best, which is why it's a terrific scripting language. If you add typing and properly catch expected errors, it's quite capable. Whether or not Try/Except blocks are uglier than err is nil is subjective.