3 ms·
I like the trick in Golang marketing, where we get a code full of references to some libraries. Same could be done about other languages. Oh, look, web server
by ghostdiver 13y ago
I like the trick in Golang marketing, where we get a code full of references to some libraries. Same could be done about other languages.
Oh, look, web server in 5 lines of code, in Java!
public static void main(String[] args) throws Exception {
Server server = new Server(80);
server.setHandler(new HelloWorld());
server.start();
server.join();
}
The trick is cheap, but it works!
- icebraining 13y agoOf course, the difference is that the Golang code isn't using "some libraries", but the standard library. Well, except for this one, which is also using some custom handlers for gzip and such.
- ghostdiver 13y agoIt is also the only one library available for Golang atm. Actually I think that this example written in Java8 with lambda expressions would be more impressive.
- icebraining 13y agoIt is also the only one library available for Golang atm. Except it isn't: http://go-lang.cat-v.org/pure-go-libs http://go-lang.cat-v.org/pure-go-libs
- ghostdiver 13y agoNice one, a fun list of hobby side projects made by Golang enthusiasts. I'm gonna drop Jetty and Java altogether in favor of AeroNotix/wedge!
- icebraining 13y agoWell, your sarcasm really showed all those people who said you should!