[Lazarus] FPDoc Editor fails on namespace dotted unit names?
Anthony Walter
sysrpl at gmail.com
Tue Apr 16 15:39:46 CEST 2013
Marco,
Regarding you question about code insight, here are two arbitrary nice
features of how code insight can be used with dotted namespaces I captured
from Visual Studio (other IDEs and other languages do similar things):
When adding "using" ("uses" in pascal) referecing a unit/assemble/namespace
IDEs can show you a list of namespaces to choose from at each dot, and then
they filter that list further as you type after the dot:
http://www.codebot.org/fpc/insight_using.gif
This would be analogous to typing "uses SysUtils, MyCompany.Te" and being
show a list of namespaces (units in pascal) which were under the domain of
"MyCompany" and begin with "Te". The subtle difference between this and
using underscores in place of dots is that with each identifier the IDE can
validate the prior identifier is a valid name space (and perhaps show you
red squiggles), and refresh the list of available items. If you backspace
through each dot within the a list you can reopen the insight list show you
what can come under each dot. Not that complicated really.
http://www.codebot.org/fpc/insight_type.gif
And the above is useful when either you want to find a type/function/var,
but you know it belongs to MyCompany. Much like how you can now say "var X:
Classes." and see a list of types in the Classes unit, except using
multiple identifier and dot pairs gives better refinement of what to choose
from. Consider an example if you were to write a program using components
from multiple vendors where the final identifiers might collide. You could
use "VendorA.Controls.TDataGrid" or "VendorB.DataWidgets.TDataGrid" to
differentiate them, while getting insight into which namespaces each
resides (along with what else the vendors provide in their namespaces).
And finally, on the topic raising expectations and attracting more usage...
anything which is done, within the spirit of keeping the pascal design
clean, which may help and please people is a good thing. I wouldn't be so
pessimistic as to say "pascal has gotten worse because its ease of use is
attracting a bunch of low skill kiddies" or "we don't want people being
attracted to pascal who might complain that it doesn't have feature X, Y,
or Z". The more and great variety of people interested in pascal, the
better. Period.
Of course the worse thing anyone can do is reply to someones questions with
another question "Why would you ever do X when you could do Y instead" ,
then follow up their somewhat verbose response with brief (lazy) sarcastic
attempts to chastise.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130416/5fb1a683/attachment-0003.html>
More information about the Lazarus
mailing list