Re: language do you recommend for getting into ESP8266
Posted: Fri Mar 11, 2022 9:38 am
It would depend where you see your projects going. You see... C++ is on the metal and compiled and already in machine language. Python is Interpreted so there are a lot of cycles just converting to machine code (that the ESP has to do) before it actually does what you asked and it has to do that for every statement from here to eternity. That'd be fine if you doing a Weather Station with 1 minute updates to your UI. If you need to do something with high calculation necessity, C++ is the only way to go (IMHO). Beside... In 50 years of programming, I've used Basic, Fortran, C, C++, C#, Pascal, Delphi, Java, and JavaScript. Once you learn the logic on one, the syntax is the only real difference... at least for most of them. C, C++, C#, Java and JavaScript even the syntax is almost identical. I find it quite natural to switch from C++ on the server to JavaScript on the Browser client. In fact, I tend to write the code the same... most of the time I can change my mind and cut/paste it from server to the client (or vice versa) and will have almost no clean-up.
But on the flip side, I hear... if you want to slap something together Python is fantastic. I think it also is a lot quicker in the development stage as you can debug it and change the code while its running. With C++, if you change one line of code, you need to compile, upload and run through the code to the location you're working on... at least 30 seconds on a mediocre i7 desktop.
Then again... maybe a Python expert will chime in and say I'm all wet and convince me, I need to add another language to my tool chest.
But on the flip side, I hear... if you want to slap something together Python is fantastic. I think it also is a lot quicker in the development stage as you can debug it and change the code while its running. With C++, if you change one line of code, you need to compile, upload and run through the code to the location you're working on... at least 30 seconds on a mediocre i7 desktop.
Then again... maybe a Python expert will chime in and say I'm all wet and convince me, I need to add another language to my tool chest.