• snek_boi ( snek_boi@lemmy.ml ) OP
      link
      fedilink
      arrow-up
      3
      ·
      3 years ago

      I know encapsulation is desirable in part because of security. I figured something similar could happen by removing the ability to import anything from another program. However, I struggled to think about other situations in which no imports were desirable, and so I wondered…

      • Ethan ( firelizzard@programming.dev ) 
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 years ago

        There are certainly situations where it would be valuable to be able to place limits on what can be imported, but I can’t imagine trying to work with a language that was completely devoid of imports. Because that would mean 100% of your source would have to be in a single file, which sounds absolutely awful for anything but the most trivial applications.