News for hackers. Stuff that matters.
Re:Moving from Go to PHP Again by YawningAngel on Friday February 08, 2019 @04:55AM (#19112835)
You can absolutely do this in Java if you want to.

I mean, it's insane and you shouldn't, but it's eminently possible.

Re:Moving from Go to PHP Again by masklinn on Friday February 08, 2019 @06:38AM (#19113311)
I'm not saying it's not possible I'm saying it really isn't convenient.
Re:Moving from Go to PHP Again by YawningAngel on Friday February 08, 2019 @08:07AM (#19113753)
But the reason why it isn't convenient is because the consensus amongst Java programmers is that it's a bad idea. It wouldn't be difficult to build tooling around if one wished to - I think in this case, the fact that almost every language has migrated away from CGI-style routing is probably telling.
Re:Moving from Go to PHP Again by masklinn on Friday February 08, 2019 @08:29AM (#19113904)
> But the reason why it isn't convenient is because the consensus amongst Java programmers is that it's a bad idea. It wouldn't be difficult to build tooling around if one wished to

That's part of the inconvenience though, one of the advantages of CGI was the low tooling requirements.

> I think in this case, the fact that almost every language has migrated away from CGI-style routing is probably telling.

I mean sure, but beyond not being a very good protocol CGI needs to execute the handler script on every connection, Java is not known for that being cheap.