2 ms·
From the programming I have done, I would say most of the 'repeated' functionality is things you would have done already, just in different ways. In fact, thing
by keeperofdakeys 15y ago
From the programming I have done, I would say most of the 'repeated' functionality is things you would have done already, just in different ways. In fact, things like making the while loop a for loop is taking away things you don't really 'need'.
It is quite different when compared to python, but it is probably better compared to C, C++ or even Java. C is nearly 40 years old, a lot of the decisions that were made in its creation look silly now (terminating strings with '\0'? yeah, great choice). From what I can see of Go, they try to address many of these aging conventions.
- Ideka 15y ago(terminating strings with '\0'? yeah, great choice) Why? What would have been better? The only alternative I know about is saving the size of the string, but that comes with its own little set of problems.
- keeperofdakeys 15y agoHow about something like a C++ strings? C strings are great for memory-constrained platforms, like computers were back in the day, or small embedded computers now. On a modern computer though, it doesn't make sense. The amount of security problems that C strings cause is unbelievable. So using something different to C strings would hopefully reduce the amount of buffer overflow exploits (you would still have unchecked array bounds though, but they would be less accessible without C strings). Of course, something like C++ strings might need more processing to do basic things, but between the OS latency/overhead, I/O times and human perception, you wouldn't notice any difference at all.