What's the best programming language for web backend and why is it Java?

What's the best programming language for web backend and why is it Java?

Other urls found in this thread:

dzone.com/articles/whats-wrong-java-8-currying-vs
twitter.com/SFWRedditImages

it's nodejs

It's Python with Django.

it's php with laravel.

fpbp

>php
"foo" == TRUE
"foo" == 0
TRUE != 0

"6" == " 6"
"4.2" == "4.20"
"133" == "0133"
133 != 0133

>web backend
>Java
Don't get me wrong, I love Java but is correct on this one.

Web development is one of the major uses of Java, or more generally the JVM.

>java
>anything but web backend
Java is shit for desktops

>[insert the language you use] is the best
what is the point of these threads?

php.

Weakly typed languages are invariably crap.

>6 trillion bytes of RAM

go

Django is the best!

kys

What makes a good backend language? Some solid concurrency model where you don't need to care for spawning too many threads or processes sounds nice. Else?

Because the JVM actually does a good job once it's hot.

good when you have IO-heavy stuff, need to use a nosql db and/or want to get started fast.
if there is a lot of business logic, you are better off with go/php/java

Number of Frameworks because webfaggots can't handle programming.

>postulating an initial open ended question then changing the question to one that seeks validation for your own opinionated answer to the initial question disregarding that the initial question is open ended and has no definitive correct answer

Java is really the worst JVM language (let's forget about Groovy for one moment).

Clojure, Scala, Kotlin, Jython, JRuby..
They are all much better than plain old Java.

because enterprise uses it for that and invests a lot of money to make sure it's the best. no hipster amateur shit is ever going to get near spring's powerlevel because they don't have the resources

I was talking about the JVM, not Java.

Fuck off you Pajeet shithead.

C++ is objectively best

Fair enough, point taken.

...

B T F O
T
F
O

Go + AppEngine

Shits fucking tiiiight and the stdlib takes care of 90% of shit

Memes and how hard you can say all other approaches are shit for arbitrary reasons that won't matter unless you're developing under very specific conditions.

Go a shit for JSON though, e.g. 95% of all REST...

Toy language used by:

* babies who can't work with static typing
* idiots who want to seem "flavour of the month"
* masochists who want over complication

it's a better bait than I have expected it to be

>Toy language
not a language
>babies who can't work with static typing
you can target node with typescript

you should just use java or kotlin at this point though

Dat enterprise.

It's readable as fuck, tons of libraries, and it's comfy.

>t. brainlet who can't into middleware

How is Go shit for JSON? I thought that was one of it's main features?

...

It's Java because
>No weird regressions, runtime bugs or other surprises.
>Plenty of boring frameworks from people with Enterprise needs
>Stack traces, while long, are always accurate
>Has a type system, even if shitty
>Great performance, all things considered

I'm a Haskellfag but when I'm doing a 9-5 job where I get paged every time one of a hundred servers starts filling the error queue, I'm choosing the most boring and stable tech I can find.

Wrong.

spring is king

>paged
it's 2017 grandpa

>it's comfy

Java has many good sides, but "comfy" ..?!?
It's everything but comfy. There is really nothing about Java that is comfy.


>No weird regressions, runtime bugs or other surprises.

Java 8. They FINALLY managad to get lambdas and streams into Java (it's not like every langauge on earth has them already..), HOWEVER:
-java lambdas are no real lambdas, they only pretend
-javastreams are not really lazy, they only pretend
-streams can give you performance hits, therefore the simple "for(i=0; i

>what is the point of these threads?
Just shills trying to push other good* threads out of the way.

*good threads like "linux btfo", "Windows? More like (((schloymdows)))", "Mac is for faggots", "what gpu is best?"

>public on every declaration
So this is what happens when POOjeet tries C++.

>-java lambdas are no real lambdas, they only pretend
what did he mean by this

>what is the point of these threads?

what is the point of anything?

>It's everything but comfy. There is really nothing about Java that is comfy.
it's the comfiest

import java.util.function.Supplier;

class Main {

public static void main(String[] args) {
int someNr = 1;
Supplier wannabeClojure = () -> someNr;

// *** uncomment the next line and you'll get an error message: ***
//myVar++;
System.out.println(wannabeClojure.get());
}
}

probably because myvar is never declared heuheueuhe

> conio.h

I don't see what's wrong with this.

Sorry, the comment should be:
//someNr ++;

Anyway, as you can see they don't really are clojures. They are only pretending to be, by disallowing any mutation of the local value inside the method. They call this "effectively final", but it's simply locking down a variable.


Java fags will defend this..

See:

Huh.


I don't get it. Why can't the lambda capture the variable?

closure*

sounds like you've been writing too much clojure

shame really, if they had decided not to release a new version of the jvm every 11 minutes it could have been a reasonable platform for desktop applications

>RAM usage
You know it's 2017 right?

Because it's implemented that way.

Sorry if I come off as a nagger, but you can see at those implementation details that it's actually "only Java" with some sugar coating.

I understand that It's just difficult to do something completely new, since Java has all this legacy code and all thsi optimization in the JVM.


Hah, you're not wrong..

I'm not sure I entirely get it.
import java.util.function.Supplier;

public class Main {

public static void main(String[] args)
{
int someNr = 1;
Supplier wannabeClojure = new Supplier()
{
Integer captureNr;
{
captureNr = someNr;
}
public Integer get()
{
return captureNr;
}
};

// *** uncomment the next line and you'll get an error message: ***
someNr = 1;
System.out.println(wannabeClojure.get());
}
}
This doesn't work either, and for a good reason. Nothing's being passed into the constructor so the "captured" variable must be a constant baked into the inner class... Right?
What I don't understand is why the lambda couldn't have been implemented under the hood like this.
public class Main {

private static class SupplierImpl implements Supplier
{
private Integer captureNr;
public SupplierImpl(int _captureNr)
{
captureNr = _captureNr;
}
public Integer get()
{
return captureNr;
}
}

public static void main(String[] args)
{
int someNr = 1;

Supplier wannabeClojure = new SupplierImpl(someNr);

// *** uncomment the next line and you'll get an error message: ***
someNr = 1;
System.out.println(wannabeClojure.get());
}
}

Of course you could easily implement your own closures:

private static class MyClosure {

public int value;

public MyClosure(int initValue) { this.value = initValue; }

}

But they are not very generic and powerfull..
Basically Java just isn't made for functional programming. It's a langauge from the 90s and it's "good enough" for anything. But it's not a clean and well-designed langauge if you compare it to langauges like Lisp or Erlang..


Maybe read about this:

>dzone.com/articles/whats-wrong-java-8-currying-vs

Is learning Java worth it in order to learn Scala later? I heard the latter was a very well designed language.

>==
>not using ===
>not using strict mode
You were asking for it.

>when your language is so broken you have to invent a new symbol for equality

i am looking for a book that contains everything about java.

what do you think about this book? I am using jdk 8 btw.

scala is shit. learn java and then maybe kotlin but there's not much point in moving past java.

>there's not much point in moving past java.
Why?

because the other jvm languages are mostly garbage. except kotlin. but kotlin is barely worth learning. it's like java with slightly simpler syntax.

this is actually extremely accurate
recently had to use C++ as a web backend and I was surprised at how simple it was

>he's still using harmful/problematic languages

How is Scala garbage?

How do you do it?

personally used a framework called CppCMS for this project
it's pretty good

functional programming was a mistake. it's a very poor choice for anything except small hobby projects and proof-of-concepts. i'm not gonna explain this, there's plenty of documentation online.

>functional programming was a mistake
Yeah that's why it's used in telecommunications and finance right

because pottering's software is used in telecommunications and finance this makes it good right

>companies that need their models to be as efficient in making money as possible are deliberately using bad languages
Sure thing

>functional languages
>efficient at anything
>good at anything
no

Some people in Ericsson don't like erlang and prefer c, Armstrong don't care about functional programming time design erlang, use prolog as based plus find inmutability,functions,pattern maching as useful.

>prop trading firms are wrong and I'm right
WEW

Golang is nice for web shit.

wait are you talking about erlang?? that shit is hot meme trash. slow af.

I just fucking hate stupid MS niggers but I suppose they have their reasons for complicating my life.

Really.

Prop trading firms don't use erlang you idiot

>hurr only idiots don't know what i'm talking about!!
>of course everyone should know what prop trading is and everything about it!!!!!
autism

You said functional languages were useless, so you admit you don't know what the fuck you're talking about? What a faggot

no i don't know about this very specific domain you keep mentioning that has nothing to do with functional programming

>has nothing to do with functional programming
>when functional programming is extensively used in said domain, and ocaml had its entire standard library rewritten by one of these companies
Retard

JavaScript is the only worthwhile contender 2000+17

you're really autistic dude

>man I outed myself as a retarded faggot
>oh I know I'll call him autistic
you're really pathetic, friendo

pee aych pee

>Is learning Java worth it in order to learn Scala later?
very much so
>I heard the latter was a very well designed language.
a bit too messy for my taste but I don't really need the advanced features in the first place. scala 3 look promising though