BGP Lego Bricks
blog.cynthia.re
blog.cynthia.re
You can find Prolog-bindings provided by me on the EV3Dev website, which are about as fast as the JS bindings and make for quite a fun weekend, combining declarative planning and plan execution in the same language. You can find my paper on that here: https://dx.doi.org/10.18420/inf2019_ws41
And if you have a lot of spare time on your hand, you can get both HUGS (a Haskell implementation) and PureScript (using the JS bindings) running on the EV3. What you should not do, is try to run clojure, as the runtime is too massive. You can try other JVM languages, but I would suggest you don't.
As I see it, there is zero reason for them to have chosen the M4. The STM H7A3 series soundly beats the F4 series LEGO went with as it has 4x the RAM (1.4MB), nearly 2x the DMIPS/MHz (2.14 vs 1.25), nearly 3x the clockspeed (280MHz vs 100MHz), dual issue instead of single-issue, bigger caches, branch prediction, double-precision floats, and without going on, beating the F4 on basically everything including total power consumption with 120mA/MHz vs 112mA/MHz at much higher performance per MHz (F4 is 90nm while H7 is 40nm). With the same VGT6 packaging in quantities of 1k, there seems to only be around a $0.60 difference (around 10%).