You are reading a single comment by @halemmerich and its replies. Click here to read the full conversation.
  • Besides the performance and RAM reasons for keeping the code "flat" there should also be taken into consideration that there are users who are technical novices just starting out to code using the espruino environment. Too much rules and focus on "best practice" could maybe deter those from even trying. There are however some apps already using typescript, so I do not see a problem in trying to get better code quality for some apps while keeping in mind the resources (especially in Bangle.js 1) and the beginners just starting out.

  • Besides the performance and RAM reasons for keeping the code "flat" there should also be taken into consideration that there are users who are technical novices just starting out to code using the espruino environment. Too much rules and focus on "best practice" could maybe deter those from even trying. There are however some apps already using typescript, so I do not see a problem in trying to get better code quality for some apps while keeping in mind the resources (especially in Bangle.js 1) and the beginners just starting out.

    Some of this depends on if you using typescript/webpack etc to turn your files into production code. It also depends on which version of javascript as it is shifting slowly towards only functions being used from a file being imported without needing the likes of webpack to do this.

    Even without any of that, there shouldn't be any difference in RAM usage between code split into multiple files and shoved in a single file.

About

Avatar for halemmerich @halemmerich started