HISE Logo Forum
    • Categories
    • Register
    • Login

    Another reason to use inline functions

    Scheduled Pinned Locked Moved Scripting
    namespace
    3 Posts 2 Posters 264 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by

      Discovered this today and thought I'd share. Another good reason you should always use inline functions when possible is because non-inline functions leak through namespaces.

      namespace test1
      {
          function myfunction()
          {
              Console.print("You shouldn't see this");
          }
      }
      
      myfunction();
      

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      Christoph HartC 1 Reply Last reply Reply Quote 3
      • Christoph HartC
        Christoph Hart @d.healey
        last edited by

        @d-healey That's mentioned in the docs though:

        Namespaces currently work only for const var and reg variables (you'll get another 32 reg slots with every namespace) as well as inline functions.

        d.healeyD 1 Reply Last reply Reply Quote 1
        • d.healeyD
          d.healey @Christoph Hart
          last edited by

          @Christoph-Hart But who reads the docs? :p

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          1 Reply Last reply Reply Quote 2
          • First post
            Last post

          42

          Online

          1.7k

          Users

          11.7k

          Topics

          102.2k

          Posts