I don't really even know where Java gets used.
Its notable that Rust is the only programming language with a "planning to use" vs "using" ratio greater than one.
These tests are the definition of "selection bias".
It's like when stack overflow publishes that 85% of programmers use javascript.
I don't really even know where Java gets used.
Rust seems like the new alternative to C++. Its supposedly safer by detecting and not even allowing unsafe coding practices. I don't know much C++ myself, I know far more Matlab, C, Python (in that order). I did however go to school with someone who is a bit of an Electrical-Computer hotshot and swears by Rust. I tend to trust this guys opinion as I've found him to be very intelligent, knew a lot before even coming in as both his parents are engineers.
Now I'm not trying to convince you guys to use Rust because of what my peer thinks but just that I'm curious to what you all think of Rust.
Studies like this result in huge variations between studies, indicating that very few of these succeed in finding even a remotely random sampling. A large metastudy could provide some insight, but OTOH, what purpose do these surveys serve? It's like asking which is most popular:
1) hammer
2) nail
3) screwdriver
4) drill bit
5) asphalt
6) orange juice
In about 2000 I got into Delphi Pascal for PCB design program.circa 2000 i got to choose between Fortran, Delphi, C/C++, VBasic. i keep VB and C/C++ until today. and further later came C#, i looked at the sample code, i was put off and never touch it again. i wonder how you (as a consultant) missed C/C++ which came much much earlier than C#. now my VB is phased out, if anything that is still has a way long to go, its C/C++, even if it has to bury under some fancier and managed named language.
In 2008 I got into C#.
I wasn't happy with speed of C# so moved onto C++.
C++ was much faster at screen redraw than C#.
In about 2000 I got into Delphi Pascal for PCB design program.i wonder how you (as a consultant) missed C/C++ which came much much earlier than C#.
In 2008 I got into C#.
I wasn't happy with speed of C# so moved onto C++.
C++ was much faster at screen redraw than C#.
Its notable that Rust is the only programming language with a "planning to use" vs "using" ratio greater than one.
https://www.jetbrains.com/lp/devecosystem-2019/ (https://www.jetbrains.com/lp/devecosystem-2019/)
[This is the key. Different languages are better suited to different jobs. And like hammers they get used for jobs they aren't well suited because that is what is available or is what the coder knows. C is widely popular because a: It does pretty well in a lot of areas and there is little you can't do if you work at it, b: It is available everywhere and c: A lot of people know it. My favorite example of this is scientific programming. You can do it in C, but it is not naturally suited for the task. But it is used widely in this area.
C runs the world ...
And, seemingly without fanfare, Fortran is still used in the scientific community. For dealing with numbers, I prefer it but I would settle for C if I had to. Pascal is the most elegant language I have ever used and if I had to implement business logic, this is where I would start.
As I remember, Delphi came with nice libraries for GUI development.
As I remember, Delphi came with nice libraries for GUI development.Their GUI library (VCL) was overblown, deficient, and buggy.
But they had a crazy-fast Pascal compiler. It could compile big projects in less than a second, and it produced good quality code. I've never seen any other compiler which would come even close. They completely re-wrote the compiler ca. 2010, so there's nothing good left in Delphi :(
But they had a crazy-fast Pascal compiler. It could compile big projects in less than a second, and it produced good quality code. I've never seen any other compiler which would come even close. They completely re-wrote the compiler ca. 2010, so there's nothing good left in Delphi :(the trick is to not recompile intermediate objects that their source files unchanged. similar to other enterprise grade C/C++ IDE such as Ms Visual Studio. seems like a lost trick when young people thought its ok to brute force recompile all on modern faster CPU, or are they the professionals who think its not worth their time? because they are pro, and pro need to complete things fast? at the stake of users worst experience, so long the money got into their pocket. the worst case i've seen is Arduino IDE but well, its free who can complaint? Borland Delphi aimed to rival its contender Ms Visual Basic. i had a chance to try Borland Delphi and C++ but i had problem building DLL with them to interconnect with Delphi apps, and never got it figured out. this was the main reason i keep Ms VB (for GUI) and VC++ (for near assembly speed grade DLL), the second main reason is the pascal criptic syntax, compared to the lovely VB.
... the trick is to not recompile intermediate objects that their source files unchanged.
What?But they had a crazy-fast Pascal compiler. It could compile big projects in less than a second, and it produced good quality code. I've never seen any other compiler which would come even close. They completely re-wrote the compiler ca. 2010, so there's nothing good left in Delphi :(the trick is to not recompile intermediate objects that their source files unchanged. similar to other enterprise grade C/C++ IDE such as Ms Visual Studio.
if arduino ide which uses gcc/makeThere are no static source files in the Arduino environment, though.
Its slowness has nothing to do with the tools it relies on.this thing need highlighting so youngsters will not take other arguments to go against C. i know this fact very well, thats why i keep typing "IDE", not "compiler". C/C++ compiler by itself is an efficient piece of tool made by real man. its just how a programmers or automated tool (IDE) uses it. this is why i suspect this is tools/IDEs specific implementation. AVR Studio 4 that i use, uses similar gcc toolchain (i guess) as Arduino IDE, but compiles at blazing fast speed, well not very fast when intermediate files not existing yet or got deleted, but not that minutes slow time. Arduino IDE is like making the code 10-100X bigger (compared to AVR Studio same code) and compile all in each go, super bloated inefficient :palm: again... IDE tool implementation, not the C. C is number one, backbone for everything else after assembler.
The Arduino IDE does store intermediate files in a temporary folder on a per instance basis. When something doesn't need to be recompiled it won't be...it doesnt seem so... i did modify my 3d printer marlin fw, that inevitably coded in arduino IDE, changing a single value and recompile will require me to light my "stick" if i dont want to get mad, and wait outside for 5 minutes to relax. 10X changing value in an IDE instance, requires 10 sticks. an abomination.
So it is slow the first time, essentially building the entire code base for the target MCU, but after that it works as quickly as you'd expect.
If you keep the same configuration, but make changes to some source files, you only need to re-run make to rebuild the kernel; and in most cases, even when your modifications span many files, the recompiles take subsecond times.
The Arduino IDE does store intermediate files in a temporary folder on a per instance basis. When something doesn't need to be recompiled it won't be...it doesnt seem so... i did modify my 3d printer marlin fw, that inevitably coded in arduino IDE, changing a single value and recompile will require me to light my "stick" if i dont want to get mad, and wait outside for 5 minutes to relax. 10X changing value in an IDE instance, requires 10 sticks. an abomination.
So it is slow the first time, essentially building the entire code base for the target MCU, but after that it works as quickly as you'd expect.
The point is that the old Delphi compiler works 100+ times faster than GCC.How do you compare the speed of compilers compiling completely different programming languages?
The point is that the old Delphi compiler works 100+ times faster than GCC.How do you compare the speed of compilers compiling completely different programming languages?
Isn't that like comparing apples and oranges?
The key is that you have to evaluate the tools relative to a task or project that you need to do. Different objectives may give different results.Ahem. Care to re-read the comment I commented to, then my comment, and your own? You are restating my own statement, in a comment attempting to rebutt me. Weird. Did you have a point of your own, or did you just want to express your dislike of me via disagreeing?
The point is that the old Delphi compiler works 100+ times faster than GCC.How do you compare the speed of compilers compiling completely different programming languages?
Isn't that like comparing apples and oranges?
You can write a program in C which does something. Then you can write the same in Pascal. It'll be roughly the same amount of code which probably can be easily converted from one to other (most likely even possible with automated C<->Pascal tool). Then you compile one and the other and compare the compilation time.I recommend you actually do that. Perhaps calculate a small Mandelbrot fractal. Then, measure the compilation and run times for both.
But this is not the point. The point is that the old Delphi compiler works 100+ times faster than GCC.
You'll be surprised at what the differences are. No, it won't be "pascal 1% of the time gcc takes", not even close. In fact, on non-Windows machines, gcc will typically be faster, and generate faster code.
Borland Delphi Version 14.0
Copyright (c) 1983,2002 Borland Software Corporation
329346 lines, 0.48 seconds, 1340788 bytes code, 2489045 bytes data.(...)
Now, get your GCC compiler and compile a 300k project on your favorite PC. See how long it takes.
$ time tcc -c sqlite3.c
real 0m0,078s
user 0m0,000s
sys 0m0,000s
$ time gcc -c sqlite3.c
real 0m3,448s
user 0m0,000s
sys 0m0,000s
$ time gcc -O3 -c sqlite3.c
real 0m23,603s
user 0m0,000s
sys 0m0,000s
For Lazarus generally, the (Windows) exe files are far larger than Delphi's (to some extent that will be down to cross-platform compatibility, but even when the target is Windows, the exes are large). However I might have missed something as I've only done a fairly small amount with Lazarus.
... so I looked at Lazarus ('free delphi) recently.
It's amazing that pascal ( Delphi ) does not appear on that survey, I guess Embarcadero is in trouble
Rust seems like the new alternative to C++. Its supposedly safer by detecting and not even allowing unsafe coding practices.
One thing I didn't see mentioned in this thread, is how useful it is to use different programming languages for different parts of the same project.
For example, I really like writing CPU and I/O-intensive code in C, but use Python for the UI.
That way, users and other developers can tweak the UI without having to worry about messing with the C code (assuming a sane interface is used between the two), and I can concentrate on getting it all to work well. (I've said it before, but the best work I've ever done, was in a team with a visually-oriented graphic artist with zero coding experience, and an UX specialist with a bit of scripting experience. We just meshed well.)
I don't like Python personally (which is a detail), but other than that, I fully agree with this.Sure; the reason I like Python for this is that it is an interpreter, so the UI code is even end-user modifible without development tools. It has issues, but right now, a Python3 + Qt5 environment is portable across all major and almost all minor OSes, and relatively easily installed on all.
In a couple late designs I've worked on, I have even gone as far as architecturing software so that the core functionalities would run in a separate process and communicate with the GUI through sockets (that way, you can even have remote control, since the GUI doesn't need to run on the same machine!)I do this extremely often in Linux, using POSIX C for the back end (so not really Linux-specific, but portable in practice across all POSIXy systems). Both for mundane stuff, but also for security sensitive things, with proper privilege separation. Keeping things modular, with well thought-out socket interfaces, makes writing especially security-sensitive code much easier. Better result.
I am still undecided whether documentation should be maintained in separate files, or extracted from the sources (via Doxygen/Sphinx/etc.); or rather, what the balance between the two should really be.
Strictly speaking VBA is a diluted version of VB, it is not as powerful. Good enough for doing Office related stuff but not really application programming.
Rust seems like the new alternative to C++. Its supposedly safer by detecting and not even allowing unsafe coding practices.
With C++ you can start reading/writing data outside bounds of arrays unless you use a try catch around the read/write which then causes an exception.
I get complete screwed up because i use C++ and C# at the similar times on projects.
:: and -> and . often get inter used and errors occur.
You can try and access an array outside of it's limits in nearly every language with run-time nasties.
The compilers don't do bounds checks as far as I'm aware.
It will make it into the run-time. Of course good unit tests would detect it.
Badly done unit testing yes.
Badly done unit testing yes.
How's that? This is a perfectly perfect gate. Nothing wrong with the unit. The problem is in the usage.