Forum
    • Categories
    • Register
    • Login

    Another reason to use inline functions

    Scheduled Pinned Locked Moved Scripting
    namespace
    3 Posts 2 Posters 347 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.
    • David HealeyD
      David 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();
      

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      Christoph HartC 1 Reply Last reply Reply Quote 3
      • Christoph HartC
        Christoph Hart @David 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.

        David HealeyD 1 Reply Last reply Reply Quote 1
        • David HealeyD
          David Healey @Christoph Hart
          last edited by

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

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

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

          32

          Online

          2.1k

          Users

          13.0k

          Topics

          113.0k

          Posts