realbasic-plugins
[Top] [All Lists]

Re: Global constants

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Global constants
From: Brad Hutchings <brad at componentx dot com>
Date: Mon, 5 Dec 2005 01:28:00 -0800
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <1h6z09k dot jvw60z204edcM%support at monkeybreadsoftware dot de> <43114280-95BC-404C-AB18-F86F0A760FED at sqlabs dot net> <378AB65D-AA2F-45D0-AFCC-FAC5278316D1 at realsoftware dot com> <53AB75A6-A962-4452-A090-58EAD24FDE7F at sqlabs dot net> <5670707A-8AA1-4B30-80D3-ECC1B764DFBC at haranbanjo dot com> <41814359-6AEB-4CD7-937D-EE63254818B9 at componentx dot com> <976D5395-4633-4933-BA04-F782B6B8B7EB at chaoticbox dot com> <9C49FB2E-C823-4535-8203-1EE5C6BAD368 at componentx dot com> <2027F348-BE8C-4E0F-9369-243AECD44CCB at chaoticbox dot com>
Point well-taken about putting global methods into a module if possible. Yes, it would be nice if that were possible with Rb2005, however, plugin developers who just whine about it not being there and then pollute the namespace badly should probably be flogged. What it comes down to is that we plugin developers are guests at REAL's IDE party, and nobody likes the guests who walk around with onion breath.

You cannot put classes and methods that extend class into modules and protect them from namespace collisions. For these, it is imperative that a mnemonic is used, especially for class names or method names that we might all like to use. "Point" and "Rectangle" come to mind... And that is a great reason to just do something consistent, like use a mnemonic prefix or suffix for any symbols your plugin defines.

-Brad

On Dec 5, 2005, at 1:13 AM, Frank Condello wrote:

Using prefixes/suffixes is a time-honoured hack (and I use it myself, mostly for Rb5.2 compatible plugins) but although it helps avoid collisions, it pollutes the namesapce just the same - it's just that the slick is more self-contained ;)

Using 1 module name in global space is far better than 30 methods that use the same prefix IMHO, and this works brilliantly in Rb5.5 so you can't go blaming plugin developers if Rb2005 has broken this behaviour.

Frank.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>