why c++ is still being used?
-
Are you sure about that? :-D SharpOS (operating system) - Wikipedia[^] Cosmos (operating system) - Wikipedia[^] Singularity (operating system) - Wikipedia[^] FlingOS™ - Home[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Afzaal Ahmad Zeeshan wrote:
You can't do that in C++ either, if you can then you can do so in JavaScript too. :)
Well, it is also not completely true. Most parts of the modern OSes is made in C and C++. You don't write drivers in JavaScript, because most devices work faster than your average garbage collector. It at least needs a language that can compile to native, without dependencies.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
Quote:
Well, it is also not completely true.
Because it was not meant to be. :laugh: It was merely a rant, or joke. ;-)
Quote:
Most parts of the modern OSes is made in C and C++
Most part comes from C, that contains Assembly in
__asm
or similar. C++ is just used to create most APIs, because you can provide a simple abstraction there. You can provide underlying implementation of the system and services, then you leave it in the hands of programmers. Of course drivers need to be fast, but what a driver is merely a program in the forest of services running. Tree (program) can be a class, a forest is abstraction, and... You cannot do that easily in C — that is why we have demons in Linux and you can write in in any definition, there is nothing to implement, nothing to inherit and nothing to worry about. Move a bit ahead, enter the realm of C++, Qt for instance, you need to write classes as inherited ones and then you can compile that across. Qt is used for driver development.The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Quote:
Well, it is also not completely true.
Because it was not meant to be. :laugh: It was merely a rant, or joke. ;-)
Quote:
Most parts of the modern OSes is made in C and C++
Most part comes from C, that contains Assembly in
__asm
or similar. C++ is just used to create most APIs, because you can provide a simple abstraction there. You can provide underlying implementation of the system and services, then you leave it in the hands of programmers. Of course drivers need to be fast, but what a driver is merely a program in the forest of services running. Tree (program) can be a class, a forest is abstraction, and... You cannot do that easily in C — that is why we have demons in Linux and you can write in in any definition, there is nothing to implement, nothing to inherit and nothing to worry about. Move a bit ahead, enter the realm of C++, Qt for instance, you need to write classes as inherited ones and then you can compile that across. Qt is used for driver development.The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Have an upvote for a smile then. ;-)
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Eddy Vluggen wrote:
can't program an OS in VB.NET.
You can't do that in C++ either, if you can then you can do so in JavaScript too. :-) Or even Python.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
Wrong. C++ compiles down to machine code, so you can.
-
Are you sure about that? :-D SharpOS (operating system) - Wikipedia[^] Cosmos (operating system) - Wikipedia[^] Singularity (operating system) - Wikipedia[^] FlingOS™ - Home[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
But the interpreter the VB Net code will be running on will be written in C or C++ because to run on actual hardware you have to run the instruction set that hardware exposes. You can only do that in a compiled language.
-
Because C is the corner stone language in computing. It is the language of OSs, space ships, embedded, etc. C++ extends that power scales it, and is a true engineers language. C# (Java) and other interpreted languages have their uses, principally where you want to limit the power of the language for security reasons, or to work at highly extrapolated levels a long way from the hardware.
-
Wrong. C++ compiles down to machine code, so you can.
Like I said in that message, in this case, so does JavaScript, Python or any other language. :-) I wonder if there is a library for translation of shell script to a machine code — highly doubted statement.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Like I said in that message, in this case, so does JavaScript, Python or any other language. :-) I wonder if there is a library for translation of shell script to a machine code — highly doubted statement.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
No, you said: "You can't do that in C++ either, if you can then you can do so in JavaScript too" C++ does compile down to machine code, script languages dont, they are interpreted.
-
As noted by others for drivers and embedded systems. It is a mature language that works well with hardware with less interpretation. One reason many people left C++ was they hate pointers, but as those other languages mature, they too employ pointers, so in the end we are now seeing a revival of C++. p.s. Some people love pointers. :-D