[fpc-pascal] Re: [Bulk] Re: Namespaces Support

leledumbo leledumbo_cool at yahoo.co.id
Mon Oct 28 14:17:51 CET 2013


> My more fresh example is:
I have, for years, many units that have the prefix 'M'. So I have
MClasses, MCore, MTasks, MSystem, etc.
Now MSEgui (by Martin Schreiber) introduced a mclasses unit -- your
own implementation of classes unit -- and I can not use both units in
the same project. :(

Namespace does NOT solve the problem. If MSE units uses M.<unit> for their units and you have yours the same as well, you'll end up renaming either anyway.
--
Sent from my Android phone with mail.com Mail. Please excuse my brevity.

"Marcos Douglas [via Free Pascal - General]" <ml-node+s1045716n5717243h95 at n5.nabble.com> wrote:

	On Sun, Oct 27, 2013 at 11:59 AM, Marco van de Voort <[hidden email]> wrote:


> In our previous episode, Marcos Douglas said:
>> > Namespaces are only for pseudo hierarchical disambiguation of unit names in
>> > Pascal.
>>
>> Very true. I agree with everything.
>> BUT, IMHO, the only problem is if you have two 3rd frameworks that use
>> the same unit name. In that case I can not add 2 units with the same
>> name in my project. So, only in that case, we could use 'namespaces'
>> to 'rename' these units only for use in our projects without change
>> the original source.
>
> In theory yes, in practice no, since that would be incompatible with
> anything below XE2+ (and most commercial component builders still support
> D7).


Yes and how I still use D7 at work I still have this problem.
This problem happen not only for unit names but component names too. I
can not register two components with the same name.
So, because that, programmers around the world use prefix in class
names. If the components were registered using 'unit+class_name' and
when we drop a component on the Form the IDE write the unit name as a
prefix, this problem not will happen.

My more fresh example is:
I have, for years, many units that have the prefix 'M'. So I have
MClasses, MCore, MTasks, MSystem, etc.
Now MSEgui (by Martin Schreiber) introduced a mclasses unit -- your
own implementation of classes unit -- and I can not use both units in
the same project. :(

> As with any feature, there are people that already design it in after the
> first beta, but it will be rare, very rare, in the wild.

Sorry, I didn't understand what you mean. :(

Regards,
Marcos Douglas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
	 	 	 	
	
	_____________________________________________
	

		

If you reply to this email, your message will be added to the discussion below:

		http://free-pascal-general.1045716.n5.nabble.com/Namespaces-Support-tp5717153p5717243.html 	

	

		 		To unsubscribe from Namespaces Support, click here.
		NAML 	





--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Namespaces-Support-tp5717153p5717257.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131028/f8d51b19/attachment.html>


More information about the fpc-pascal mailing list