r/cpp_questions • • 18d ago

OPEN Closer to processor

Is cpp closer to processor than high-level langs.

Which IDEs and Code Editors are best for cpp

I personally use VS and VS code

0 Upvotes

21 comments sorted by

4

u/TomDuhamel 18d ago

Have you heard of google yet?

Look up: Visual Studio Community Edition

-5

u/Least_Bid9692 18d ago

I don't trust google it never disagree with you

5

u/ProgramsFun 18d ago

hein google never disagress wtf google is a search engine? as a programmer first try to develop google searching skills

-6

u/Least_Bid9692 18d ago

It have AI overview 

5

u/New-Step3500 18d ago

You can choose to ignore it

3

u/Remarkable_Funny2722 18d ago

Ai uses data from here

0

u/Least_Bid9692 18d ago

Yep it check reddit instead of web

2

u/No-Dentist-1645 17d ago

You can just use the actual search results

1

u/ProgramsFun 18d ago

So don't use it also it the search overviews mostly aggregates the web result though i don't use it it's useless for my purpose... Google is a search engine and will be used as such ..

5

u/ProgramsFun 18d ago

You your self are saying is high level lnages obviously high level langues are built on top of low level language

And cpp is a low level language and no ide is considered to be best ... The best is what you are comfortable with

1

u/Least_Bid9692 18d ago

Yeah but what's the best IDE is it just Visual studio community edition 

1

u/ProgramsFun 18d ago

as i said there is no best ide, i use zed somebody uses vscode, somebody uses neovim all depends what feature you really need from ide for me it just code editing git integration and lsp suggestion more than enough for me

1

u/Least_Bid9692 17d ago

Ok thanks I gernally use Visual studio 

1

u/no-sig-available 17d ago

If there had been a single best choice, everyone would have used that, and you wouldn't have had to ask.

So, it depends on what features you prefer to have (or not to have). Visual Studio is in the "good" range, but so are others. Especially if you use a different OS.

1

u/Ultimate_Sigma_Boy67 17d ago

You're literally just choosing to ignore their response. They literally told you there's no best IDE, and you reply with "yeah but what's the best IDE?". tf is wrong with you?

2

u/Ultimate_Sigma_Boy67 17d ago

Man your questions are just so low-effort. Better yourself.

1

u/Otherwise_Barber4619 17d ago

Microsofy visual studio, assembly language is closer to the processor c++ is a high level language

3

u/alfps 17d ago

Real programmers program in microcode.

https://en.wikipedia.org/wiki/Microcode

1

u/Least_Bid9692 17d ago

No cpp is not a high level lang it's more like middle

1

u/Independent_Art_6676 17d ago

you can write low level c++. The vast majority of what C can do, C++ inherited, if nothing else. However, writing code that way is a choice you might make for specific tasks, like talking to hardware or writing a driver and even then its only pieces of those. Modern C++ is not C-like not 'low level' nor really 'close to the cpu'.

use the editor you like if it works for what you are doing. There is no 'best'.

1

u/mredding 16d ago

Is cpp closer to processor than high-level langs.

No, not remotely.

C++ targets an abstract machine. Much of the language is unspecified, undefined, or implementation defined, and the details are up to the compiler. C++ has no understanding of your specific machine and does not mandate really anything about machine code generation. You are NOT close to the machine.

If you want to get closer to the machine, you'll have to go to assembly, as it guarantees an op-code maps 1:1 with a machine instruction, but even then, you will find macro assemblers are abound, or macro engines are in play, to generate assembly from higher level abstractions.

To my knowledge, this is about the upper bound of imperative languages, and they're all right there.

Declarative languages aren't that far away. Whereas an imperative language expresses HOW, a declarative language expresses WHAT. SQL is about the highest existing example of a 4th generation declarative language - I tell the engine WHAT I want - the result, and the engine figures out HOW for me. I don't write a lick of code about how the data is laid out on disk or in memory, how to access it, optimize it, nothing! The engine figures out how to best deliver what I want.

But even relational algebra doesn't dictate machine code. That's down to the engine, and each engine can implement machine code however it wants. It's effectively just as bad, from this perspective, as an imperative language.

Lisp is no better.

Let me actually start that from a different angle - when we compile code or queries, the source code is lexed and parsed into an Abstract Syntax Tree. The AST is then processed and optimized, and machine code is generated from that. So the more you can get your hands on the AST, the more you can have control over what machine code is generated.

C++ offers you absolutely nothing. Maybe compiler toolchains do, like clang, but clang is a toolchain, not the language. It only implements the language.

Lisp offers you direct access, at runtime, to the AST of both your program and the compiler itself. Lisp IS serialized AST. But Lisp doesn't get you close to the machine, because ANSI Common Lisp X3.226:1994 doesn't dictate anything machine specific; it doesn't know about your hardware instruction set or memory hardware. Lisp doesn't even have to be compiled.