chudybyk wrote: Also, I think Python on Arduino is more of a curiosity than a useful tool. Python is a scripting language, it needs a specific environment to run, which can be provided by an operating system with much more resources than Arduino. I would be afraid to run something in this environment that contains more than a few dozen lines of code. For this I have doubts how many Python libraries are able to run on Arduino. There is a huge chance it will crash out immediately after booting up.
Personally, I would advise you to program in Python under a slightly larger platform, for example Raspberry Pi, which is a full-fledged Linux and Python has a chance to run on it without major problems. The convenience of work is also incomparably greater.
Another issue worth considering is safety. If you want to use a device and program in railways, there are certainly rules and standards regulating the safe use of electronic equipment and embedded software. Make sure that using your own inventions does not cause any threats to life or health, and as a result, legal liability.
Yes, Phyton was developed as a scripting language, but you don't program a microcontroller in the scripting language, so you need a compiler for that. The compiler, on the other hand, makes such a scripting language, in a given case, a language compiled into machine code. (Personally, I don't like Python, maybe because I'm a mathematician by training and C / C ++ is more logical for me). In this case, the quality of such a compiler (what code it generates) and the programmer's skills are more important than the programming language itself.
As for arduino, you probably don't quite understand what it is. Arduino is a library (programming, not hardware), not an operating system, or some exotic programming language as some people think:] Syntactically it is largely compatible with C ++, you can also use syntax and commands in C. It is thanks to this library and the compiler produces binary code that you can run on the microcontroller. The result code, on the other hand, is closely related to the quality of the compiler, not the programming language itself, and the library itself. By the way, by programming in arduino, you can run the program on the microcontroller itself, also without a bootloader. As for the assembler itself, it is just rubbish as if it is a way to deal with all problems with code performance and quality. It may or may not be, because it depends on a really broad knowledge and skills of such an assembler programmer. The authors of compilers most often have such knowledge and skills, also about any tricks with the code, hence often the compiler's output code will be of much better quality than the assembler from an average programmer's finger. Advanced compilers like GCC and clang are quite intelligent these days and optimize the object code to be as optimal as possible (concise and efficient). It is true that the assembler itself also requires a compiler, but here the matter is more compiled, so that the result code can be optimized efficiently.
As for security. You haven't elaborated on what exactly are you talking about. You can protect the code against theft by blocking the possibility of copying it from the microcontroller, as for security in terms of its inappropriate use, it is the programmer's gesture, not the language itself. If the program is to control some wifi or bluetooth equipment, or you want to avoid the so-called memory leaks etc. you should simply know what you are doing, especially in the case of commercial use of a program you wrote, including any additional libraries you want to use. I program in C ++ myself, which scare children about how hard to grasp and dangerous language due to memory leaks, repeating myths from the 1980s. Currently, however, both C ++ and other modern languages have mechanisms to prevent such a memory leak. Some have something like Garbage Collector, such as C #, or intelligent pointers such as C ++ 11 and higher. So let's know the exact language you are using and use the newest versions possible:]
As for the scripting languages such as Python, virtual machines like java, bit codes in C #, etc. Many of them also allow you to compile the code directly into the machine code, directly, or convert it first to C / C ++ as it does, for example, Qt and then its compilation. This is to illustrate how the language can be used for purposes that we would not have been able to do in the original.