sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Example] Global methods are bad

    Scheduled Pinned Locked Moved Developers' Forum
    1 Posts 1 Posters 77 Views 1 Watching
    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.
    • thomthomT Offline
      thomthom
      last edited by

      This screenshot illustrates how global methods infects every class and module in the Ruby environment because they are added to Kernel which is inherited by Object which is the base of everything in Ruby.

      GlobalMethods.png

      This post is meant to be a visual example to why global methods are bad and why one should not create them.


      Link Preview Image
      Golden Rules of SketchUp Plugin Development

      The Ruby language is very easy to extend to suit your needs. Some very pretty looking code can be written. However, when you write plugins for SketchUp’s Ruby API you should be careful. The e…

      favicon

      Procrastinators Revolt! (www.thomthom.net)

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement