WHY DOES NOT ANYONE POSTS ABOUT JAVA ?
A SIMPLE REPL MADE BY ME CONSISTING THE BASICS OF JAVA .....
I really like that you included example code from Java in this post, it actually helps a lot as I have never coded in Java before. I'll have to try it out. I primarily use Python right now, but perhaps Java would be cool to learn for Minecraft plugins and stuff.
its bc all of the big peeps on replit use HTML/CSS/JS because it's good for graphics and crap(idk why just guessing lol) or python bc it's easy. Personally, I prefer C++, which nobody who is anybody on repltalk uses.
@FlaminHotValdez Yeah, it's many times slower than Java or C++, but I've always thought human-readable code is the future, and Python is leading it. Plus, Python has a TON of modules that you can import and use. It's decently powerful, but if you need speed for something like a game then yeah, use Java or C++.
I use C/C++ and JS. Anyways someone made a large tutorial about java here: https://repl.it/talk/learn/Java-and-The-ultimate-tutorial-to-get-you-started/58672
@HimanshuShekha4 I don't say they are dead, I just say that they are not popular in Repl.it.
Also, there are other languages for game developers to choose besides C/C++, Lua is pretty dominated the game engines (and embedded) industry because of its simplicity, and many like Python, Rust, Golang.
And also, C/C++ is popular for making games, not designing games.
@xxpertHacker LOL I thought you liked C++.
Also, yes C++ isn't practical for programming because the average programer doesn't need (and generally doesn't want) to redefine everything (ok that's more ASM, but still C++ is pretty low level too).
I actually want to make a web server in C++ just for fun.
I made my portfolio repl in golang and I really like it.
C just seems old in general and is like the shy kid at the back of the class. No one really interacts with it anymore.
@FlaminHotValdez Rust can easily have better runtime speed.
C++ isn't the language that you can get whole program optimizations from.
No one uses C++ for performance because the language itself provides the tools to write blazingly fast code, they use it to exploit the compiler optimizations.
Don't believe me?
Go write a vectorized loop, using SIMD and threading.
You don't, the compiler is expected to optimize normal code into that stuff :/
Just use the
-O0 compiler flag and suddenly, C++ isn't that great anymore, same applies to C.
@xxpertHacker Yeah. Go look at the problems in USACO, they only allow submissions in Python(versions 2 and 3), C, C++, Java and Pascal. The time limit for cases for Java and Python is actually extended due to their slowness compared to C, C++ and Pascal, sadly no one uses Pascal.
@xxpertHacker Ya, but sometimes other languages are more convenient, for example Python has a function that converts decimal to binary, which saves a lot of time(Might not sound like it matters but you're under a time limit), but it's happened more than once to people I know that their Java/Python code doesn't run fast enough despite using the correct algorithm to solve the problem.
Well, I have three reasons why I don't use Java
1. I never learned it because Python was easier for me at the time
2. To print something in java you have to do:
System.out.println which is a lot harder then just typing
3. It always seems to run slow, I don't know if that is just me or what
@InvisibleOne you are right , I am also a python developer but my uncle told me that python is like an automatic car (gearless car) ......but you first need to learn to drive with gears ... (now coming back to the point) java is a very light language and it can handle huge programs with ease though it helps us get a deeper understanding about programming ... thats why i would suggest java along with python ....
@HimanshuShekha4 I like java too, I mean it's very organized in meaning of object oriented programming, but it can be heavy in the syntax, for example to get user input you have to have 4 lines of code. @InvisibleOne If you use eclipse java (like I used to) there is an autocomplete for
automatic car (gearless car) ......but you first need to learn to drive with gears ... (now coming back to the point) java is a very light language and it can handle huge programs with ease though it helps us get a deeper understanding about programming
You first need to learn to drive without gears to learn the fundamentals of programming, before driving with gears.
And still Java is still a large abstraction over languages such as C or C++ where you have to manually manage memory.
@Whippingdot C++ is fast at runtime, not compile time.
It's like... a racecar... that's slow to startup.
Yes, you'll win the race, but everyone else will have already gotten in a few laps by the time it starts moving. And if a compiler error occurs, well then... time to fix it and recompile, all over again.
C, Rust, V, etc, all compile way faster than C++, plenty of languages are safer than C++, and a few languages can get better runtime performance than C++.
Yeah but the racecar wins the race at the end right? That means that in the end, C++ is faster.
Sometimes, but like I said if there's a bug...
Also, it doesn't win short races where it needs to stop often.
Also, sometimes it crashes because of how unsafe it is. Can't win if you crash :/
Looooool. What do you mean it crashes. I have been coding for a year and I haven't coded too complicated programs yet. Meaning I don't know too much. One thing I know is that C++ is used to make Windows, and many popular games. If it crashes then how...and why...?! Also bugs... very true. If the bug gets into the car you will get bitten and you will crash. @xxpertHacker