Re:I Want Off Mr. Golang's Wild Ride
by steveklabnik on Friday February 28, 2020 @12:51PM
(#22444666)
C++ has been adding things like optional types; std::optional was released in C++17, there's talk of maybe pattern matching coming soon...
Java has Optional as well, but as you well know, you can't just bolt ADTs onto the side of a language and wash your hands of it.
The whole system has to be designed around it to get the benefit of it. Java programmers will be checking for null until the last line of Java is written.
Re:I Want Off Mr. Golang's Wild Ride
by steveklabnik on Friday February 28, 2020 @04:36PM
(#22446631)
Sure, but the argument was that folks would reject it, when they in fact have explicitly added it. Its effectiveness is another story; not only along the axis you were talking about, but also others, but that's a separate conversation.
The language maintainers adding new features to appeal to people newer to the language is not mutually exclusive with veterans of the language not adopting the new features.
Some form of optional has been in wide use in the c++ community for more than 20 years.
> Java programmers will be checking for null until the last line of Java is written.
Not necessarily. Adding nullability types to Java is a smaller undertaking than adding generics was.
Re:I Want Off Mr. Golang's Wild Ride
by gameswithgo on Friday February 28, 2020 @01:06PM
(#22444831)
Yes, in fact Go's paradigm for errors is a clever half step towards option types.
The authors just happened to work at Google ,while having a manager that supported their work (check Go Time podcast), most of Google's relevant products keep being done in C++, Java and Python, and they are one of the biggest contributors to LLVM/clang, and ISO C++.
Its podcast #100 for anyone who want to listen.
https://changelog.com/gotime/100
consider things like the golang date formatting string. to anyone not well versed in a C++/C ecosystem, the golang date formatting string is absolutely nuts. it is complicated as hell and doesn't really make any sense. but consider the reaction of a C++/C developer: they're probably quite comfortable with it, because it's basically stolen from C. functions like itoa and atoi harken back to a """simpler""" time, despite being virtually nondescript for anyone who didn't start their careers with that stuff.