Untitled

.

Attached: serveimage.png (1600x900, 95K)

Other urls found in this thread:

docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.5.ldc
en.wikipedia.org/wiki/List_of_game_engines
twitter.com/NSFWRedditGif

In Java 1
In C++ 27

One you retard

implementation-defined

nvm figured it out

2.

You're making a literal string "abc" then putting it intside a new string object

cont.

Imagine this scenario

String s = "abc"
String ss = new String (s)

thats what the fuck is going on here, people. unless the compiler is optimizing your derp

It's three
>one for the constant string
>another one for the instance
>a third to store the value

>implying a reference is an object

wrong. the string literal is not an object

Attached: string.png (1345x485, 109K)

in java

no objects are created

Attached: asdde.png (430x305, 9K)

Two

Nice try pajeet, C++ is still the thinking man's language

and C# and most other object oriented languages. especially if they have GC

whyyyy the fuck do people keep saying this? c++ has been outclassed decades ago. theres better, faster, more structured programming languages available. Including ones that compile to native x86

0. They are interned by the compiler.

It is. There is no primitive string in Java. It will be resolved to an ldc instruction with a reference to the constant pool table entry, which will push a String class instance on to the stack.

>Otherwise, if the run-time constant pool entry is a reference to an instance of class String representing a string literal (ยง5.1), then a reference to that instance, value, is pushed onto the operand stack.
docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.5.ldc

Wrong.

public class Meme {
public static String s = new String("abc");
}


>javap -c Meme.java
Compiled from "Meme.java"
public class Meme {
public static java.lang.String s;

public Meme();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."":()V
4: return

static {};
Code:
0: new #2 // class java/lang/String
3: dup
4: ldc #3 // String abc
6: invokespecial #4 // Method java/lang/String."":(Ljava/lang/String;)V
9: putstatic #5 // Field s:Ljava/lang/String;
12: return
}


See here for more info about ldc.

Yea sure bud, that's why LLVM is in C++14 and the compiler it produces are already better than most of the mainstream in a lot of languages.
And of course, the executables are also faster.

You're a fool if you don't think a language that has:
>abstraction
>template programming
>stack allocation
>heap allocation
>anonymous functors / classes

While keeping a focus on optimization in a language that tells the compiler everything it needs to know about a function or a variable.

Give me ONE single language that is as complete as C++.

The C++ language body has been working their asses off trying to get it up to speed. They've been doing it mostly by ripping off C#. They still need to get modules out the door before they work on standardizing package management. Still, the language lacks modern framework support.

Java isn't bad, but it isn't anything special either. Now that Oracle is squeezing what's left of Sun's tech for what it's worth, there is no reason to take it over C# or any another modern language.

Attached: 1417918696256.png (900x891, 148K)

where is "abc" allocated? there should be 2, yeah?

Since you seem so keen towards the LLVM compiler, let me suggest all these other languages that use it as well.
>ActionScript, Ada, C#,[4][5][6] Common Lisp, Crystal, CUDA, D, Delphi, Fortran, Graphical G Programming Language,[7] Halide, Haskell, Java bytecode, Julia, Kotlin, Lua, Objective-C, OpenGL Shading Language, Pony,[8] Python, R, Ruby,[9] Rust, Scala,[10] Swift, and Xojo.

For example, you could be coding in Swift instead. Youd have access to all the new features of this modern language without all the unecessary boilerplate and memory management that youd have to deal with with a lower level language. you'd have to be a fool to stick with C++ for the rest of your life

It's allocated when the class file is loaded. It's a constant, and all constants are listed at the beginning of a class file.

Or a dev working on compilers.

Also you didn't seem to get my point. Why do you think all those compilers are made in C++ ? Not because it's an outdated language but because it's actually the most complete one.

Talking about memory management ? C++ stl handles it all for you, with or without objects (since the introduction of smart pointers).

I will reiterate my question: name ONE language more complete than C++.

oh I guess I should back up for a second and ask why do you prefer such archaic coding patterns? do you not care about productivity? any low level stuff you wanted to do you could easily do in most other languages, including bit manipulation. so why prefer the "complete" language thats somehow missing all the new shit? like optionals and lambda expressions?

Spoken like someone who has never did real work in C++. You actually know nothing about the languages don't you ? Cause it has those features.

And if you want to talk about productivity, it's just as in any other language. Give me an example of something that can be done in any of your meme language that would actually be a problem for a C++ programmer ?

since when has C++ had optionals?

If we've gone to a point where I need to spoonfeed you for something a single search away then I'm pretty sure we're done here.

nah, my point still stands. C++ is just a boomer language. old folks dont want to adapt to the new shit and they never have a concrete reason as to why

Learn your move semantics you literal niggers. Only one object is created, then ownership is transferred 2 times.

Why would one work in a language where its actual functionality is hidden behind managed bullshit

0 it's computer code it can't be a tangible object

you could say the same thing about any compiled language.

the further you abstract away from low level bullshit, the more you can focus on productivity. why waste your time dealing with memory management to save a few bytes here and there when you could cut the dev time down by 33%?

Actually laughable, gets caught spreading lies on the internet get destroyed with FACTS and LOGIC and proceeds to back down.
Look at the features added to the latest standard version. By your logic, nobody should drive cars cause they're for grandpas. Even when newer version comes out with everything needed.

Just stop going out of your depth, read books, learn what languages are made of. Idk what your education is, but from the looks of it you actually don't know much about programming.
Fucking wasting my time with some code monkey.

the only thing that does the same things as C++ but better is Rust, and literally nobody uses Rust. there are alternatives but to say it was "outclassed decades ago" and "there are better" options just because you can "compile to native x86" is dishonest. there have been few alternatives for a long long time.

literally all videogames are made in C++

Rust isn't better than C++ for gods sake stop with this meme.

literally untrue

back to name calling again. not like I expected any better of you XD

have fun feeling super leet dealing with pointers and memory management when you could just not. I can only imagine what other crazy bullshit c++ devs have to deal with that I dont simply because I'm using a modern language that lets me focus on the coding, not the compiling

it's literally C++ without the pozzed OOP shit.

okay, what game companies don't use C++ as their standard?

many, you could have googled this you know
en.wikipedia.org/wiki/List_of_game_engines

>a list of all existing game enginese is an accurate depiction of what's being used to make videogames in current year

You started with name calling when you called me a boomer. I'm 26 for the record.
Now you did deserve to be called a laughable human, cause you are one.

>I can only imagine what other crazy bullshit c++ devs have to deal with that I dont simply because I'm using a modern language that lets me focus on the coding, not the compiling

Seriously, stop. Please stop embarassing yourself, anonymous or not I don't get what would push a human being to spew shit like that in any context.
You don't know shit about C++, stop talking about it before you actually learn about it. This isn't /v/, it's not a war between languages as there are wars between console and PC and everybody has a right to an opinion.
I'd tell you to go back, but the sad thing is Jow Forums is filled with too many idiots like you.

it literally says the language of the game engine right next to it you DENSE mOTHERFUCKER lmfao

Attached: The.Simpsons.S07E06.Treehouse.of.Horror.VI.1080p.Bluray.x265.AAC.5.1-ImE[UTR].mkv_snapshot_10.58_[20 (1472x1072, 150K)

you didn't even read my post you dense motherfucker

nah, get bent, elitist kiddo. just because youre learning C++ in college doesnt make you some sort of tech guru or something. branch out for once

(You)

you literally said
>literally all videogames are made in C++
and I proved that you are literally incorrect
and furtheremore, you a literally a retard

>you

Attached: 1549425010749.jpg (565x425, 57K)

>dancing around semantics instead of taking down the central point because you can't

Attached: lol.jpg (750x722, 53K)

In C++, that's a syntax error.

>you didnt read my post
now
>youre reading too directly into my post
get real bucko

the only sane post here

correct.
you didn't read literally
yet you chose to read literally
I wonder why that is

Java is shit.

No, not "most other" OOP languages.

in reality, in Java strings are stored in effectively a global cache.
So unless you modify the string, chances are it'll point back to the existing string.

Jesus, OOP needs to die in a fire.

wrong.
Pure languages need to die in a fire.

Not enough info

Haskell is pure, and purely based.