5 ms·
Even the Java ecosystem managed to get their crap together and make the excellent Apache Commons library collection to deal with a similar situation (anaemic to
by creshal 11y ago
Even the Java ecosystem managed to get their crap together and make the excellent Apache Commons library collection to deal with a similar situation (anaemic to useless standard library). C++ has STL and Boost.
Only the PHP and JS communities seem to think that not having a solidly designed "base" library is fine (and even PHP seems to be getting better at it with 7).
- morsch 11y agoThe Java standard library is anemic? As in Java SE? That's rich. Java SE is an everything but the kitchen sink standard library, with functionality like collection classes, local and networking IO, windowing toolkits (more than one), database connectivity, the list goes on. There is no language with a less anemic standard library, and Java SE is often criticized for being too large.
- opmac 11y agoThis is true. One wonders if OP has actually seen the vastness of Java SE or is just "hating" to "hate".
- creshal 11y agoI've seen it, and more often than not frustratedly turned to Apache Commons because the Java standard library is as vast as it is useless.
- usrusr 11y agoThe JRE lib seems to be a compromise between "common types for everybody, but leave the convenience to external libraries" and "batteries included". This leaves both camps deeply dissatisfied, but allows for a great deal of integration between libraries. Maybe I have looked at Microsoft flavored C++ one time too often, but the fact that a single string type could reign unchallenged for twenty years makes it easy for me to accept that I need to use weird imports to tackle exotic convenience desires via statics (that, and the sad underutilization of CharSequence).
- mdemare 11y agoJava SE includes a lot, but it does emphatically not include a reasonable amount of useful string methods. These are the javadocs for string: https://docs.oracle.com/javase/7/docs/api/java/lang/String.html https://docs.oracle.com/javase/7/docs/api/java/lang/String.h... and these are the rubydocs: http://ruby-doc.org/core-2.3.0/String.html http://ruby-doc.org/core-2.3.0/String.html The difference is absolutely massive. When working on Java projects, I've always included commons/StringUtils reflexively, and even then Ruby is quite a bit ahead. The same applies to collections / enumerables. There's a lot in Ruby that I don't like, but powerful "batteries included" standard libraries for the basics like strings and collections are the bedrock of any programming language. It only takes hard work to write them and test them, not any specific skill, so there is no excuse for all the language out there that are skill lacking, in 2016, a sensible collection of utility methods.
- nradov 11y agoMuch of that functionality is in other Java SE standard library classes. You can do left padding with Formatter. http://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html http://docs.oracle.com/javase/8/docs/api/java/util/Formatter...
- krinchan 11y ago>There is no language with a less anemic standard library PHP would like to see you out back in the alleyway, as some other posters in this thread have pointed out. > Java SE is an everything but the kitchen sink standard library, with functionality like collection classes, local and networking IO, windowing toolkits (more than one), database connectivity, the list goes on. Yes. However, there are a lot of design decisions held onto because of backwards compatibility that continue to cause massive pain points. Object.toString() comes to mind. The fact that String.format() has to be either statically imported or typed out every time. I'm so sick of lengthy string concatenation in Java. "When I use format " + createSentenceStringFromList(work.getCoworkers(), "and") + " act like I've committed " + A_HORRENDOUS + " crime."
- smt88 11y agoPHP is absolutely the last language I thought anyone would accuse of missing standard features. PHP is massive and includes absolutely insane numbers of functions to do everything. If you can think of 3 basic, universal functions that PHP doesn't include, I'd be shocked. Also, PHP 7 has absolutely nothing to do with standard libraries, as it doesn't really add anything in that regard.
- mreiland 11y agothe cool kids make fun of PHP. You must not be a cool kid.
- golergka 11y agoEverybody makes fun of PHP.
- coldtea 11y agoExcept people busy running businesses and creating with it.
- creshal 11y agoWe run almost everything on Wordpress and still make fun of PHP. And JS. And Java. And ObjC. And Ruby. And Python. Every language has its share of problems and sometimes you just have to vent.
- coldtea 11y agoSure, but: "we make fun of every language/every language has its share of problems, etc." is a completely different statement/message than "everybody makes fun of PHP" -- which singles it out as some huge abnormality...
- mreiland 11y agoapparently the humor of the post was lost on a few people...
- deleted 11y ago[deleted]
- acqq 11y agoI don't consider C++'s Boost something to be proud about. Last time I've checked, Google forbade a significant part of it to their developers, and in my opinion rightly so. But who likes everything there should just as well understand this Node affair.
- vinkelhake 11y agoBoost has been incredibly successful as a breeding ground for new C++ libraries. Much of the functionality that was added to the standard library in C++11 came from Boost. This continues to this day. It's a collection of libraries, no one is using all of it.
- GFK_of_xmaspast 11y agoGoogle's c++ guidelines are idiosyncratic at best.
- TeMPOraL 11y agoGoogle makes a lot of controversial decisions from engineering standpoint, not least of which is doing half of their stuff in Java. (It always bewildered me - why hire the best of the best, and then make them work with lowest-common-denominator tools?)
- acqq 11y agoFrom my point of view, if we remain by why not allowing everything Boost, it isn't controversial at all, for the same reason that Linus (an I too) believe that it is a good that Linux kernel is pure C and not C++. And the same reason why some people now see that the presented Node popular practices aren't something that the battle-tested players consider reasonable to do.