@Martin_fr
I understand from the thread that there are lots of shortcomings wrt namespaces. I have seen a few that is not mentioned as well (e.g. it changes the case or cannot handle reserved words as part of the namespace). Again, maybe I am trying to put a pattern to something that cannot handle it without an arm and a leg - not going to explain my understanding of namespaces but generally I thought that I did not have to worry about duplicate type names in different namespaces and could organise directories to (Javaism) to namespaces.
Well it's not java. Directories aren't namespaces... Though IIRC in fpc trunk there are additional namespace features, but I haven't looked at them yet.
Without those new namespaces (in trunk, or IIRC in trunk?) you just have your unit names. All unit names must be unique across all directories. (Yes that is a limit / and afaik those new namespaces will bring relief for that / but fpc trunk is still a long time to next release...)
Keywords can be prefixed: "&begin" allows you to use "begin" as name/identifier/...
Classes (and types) can have non-unique names. There full name is "unitname.typename".
And as lang as you can figure out to which "TMyClass" your code is referring (if you have lots of different TMyClass) that is fine...
Almost...
If the debugger encounters "TMyClass" it will not know to which unit that refers. So the debugger may use the wrong one. Shortcoming in part of the debugger, in part of debuginfo and what the compiler provides.
The debug info does unfortunately not provide the full scoping rules. And it does not include wich other units were in uses, so if the debugger doesn't find TMyClass in the current unit, then it doesn't know which one. (and a couple of other issues... too technical)
But also shortcoming in concept. Because you can pass an instance of UnitFoo.TMyClass to a function in the current unit. And that will work, even if UnitFoo is not in the uses class.
So, if you have such a TMyClass which has different declarations in various units, then you must (in the debugger) always manually write "UnitFoo.TMyClass(instance)".
The auto-cast "Use instance class" does not do that (not yet, on my list, but wont be in Lazarus 4)
So, yes re-using names is possible, but does have it's downsides in the debugger.
(And imho in code readability, because as a reader I may not know which TMyClass it is / but that is just my opinion)
I like organising code into small classes and unless I want to hide something, I generally put it in a file of its own. This workflow not only is the way my head works (due to a million other tools), but makes for a much easier git workflow too.
small classes and duplicate names aren't necessarily related...
My debugger was set to FPDebug; and the debugging on classes are still too shallow. I hear you, there are known issues and vast improvements on the way - I will refer back to this thread to see if I can improve the Watches and Locals, and what if any I can do to improve otherwise.
Well, as indicated
Properties that have a method as getter don't work. Known problem. In the works, but will take major time, as a lot of parties need to do their homework.
Otherwise, please let me know what you think needs improving.
Btw, 4.0 RC1 should be there in a few days => so you might use that for testing.
Marcov, I obviously did not make my point well here, I don't think it a a case of documentation or understanding, it is a case of what constitutes general IDE functionality or editor wrt file management and refactoring (with file management being the low hanging fruit). And yes, I can do it in a terminal or "explorer", but that makes me leave the IDE which is a bad workflow; or having to open files to Save As to rename a file etc...
What exactly was your issue with "save as"?
I used that in the past, and usually the file is saved in the new place, the path added to the project, and the IDE offers to delete the old file.
Moving/Saving an entire project to a new folder may be a bit different.
Though, it can be done with "Publish project" (not the most intuitive)
Refactoring.
At least renaming exists in
menu: Source > Refactoring > Rename Identifier.
In most case at least. Know issue, iirc are inherited methods.
Maybe the question is rather - who decides on what is good for the IDE to promote its use...
Probably mainly man power...