4 ms·
I gave it a shot on some real code, and (more or less as expected, but I was ready to be surprised) the custom parsing code does not handle templates and overlo
by MauranKilom 4y ago
I gave it a shot on some real code, and (more or less as expected, but I was ready to be surprised) the custom parsing code does not handle templates and overloads well at all.
Example 1:
template<class T> void foo(T t) {}
struct X {};
void foo(X x) {}
template<class T>
int bar()
{
foo(T{});
}
Example 2:
template<class T> T getFoo(int); // (1)
struct X {};
template<> X getFoo(int) { return {}; };
X getFoo(int a) // (2)
{
return getFoo<X>(a); // (3)
}
In both cases, "Rename" only affects a quasi-random subset of the foo/getFoo occurrences, depending on which one you select for renaming. It roughly looks like "match every name to the most recent definition of a thing with that name", but things like "go to definition" on (2) going to (1), or on (3) going to (2) is just pretty absurd.
Yes, it's super fast (instant), but also super useless right now. When I use "Find References" or "Rename", I _need_ it to be 100% accurate. I have to be sure that I caught all uses. In cases of ambiguity (such as the templates above), it has to involve the user (e.g. "these are guaranteed matches, for these other ones it's not clear - select all that should be renamed"). Visual Assist is miles ahead here. And yes, I know, this is extremely difficult in C++ (and likely impossible to square with the "instant" speed goals). But being able to trust my tools in a complex code base has priority.
Other feedback, in a "take it or leave it" fashion:
- Automatic perforce integration is nice to see
- timelapse and history commands don't work though... (not in PATH?)
- Defaulting the title bar menu to only show on hover is weird imo.
- The title bar menu items should be centered inside the buttons!
- Opening header and cpp in different columns is a nice default.
- Settings file editing is also surprisingly fun, thanks to the builtin suggestions.
- Switch to a different colour scheme -> expand folder in workspace tree -> newly appearing elements have old theme...
- I set the keybind for "close file" to Control W. Now pressing Control W always closes two files (?!)
- Right click -> zoom -> that menu item and the submenu (except any submenu item you hover over) render as pure black...
- STL include file paths are not found automatically for a VS solution. Forgiveable though.
- Sometimes commands (e.g. Go To Definition) don't do anything. Sometimes it starts working eventually (parsing was incomplete?), sometimes not. There needs to be some kind of reaction/feedback ("definition not found"). Not necessarily a message box, but at least a toast or status bar message.
- Ctrl + left click also does a range selection if you hold down LMB for slightly too long...
- In a Citrix remote session, home/end lock up the entire session if the view needs to scroll horizontally and there are many long lines.
- create new file, fill it with e.g. 60 long lines of e.g. A characters (something like 120 chars per line) -> navigation becomes extremely sluggish
- No idea if this is primarily on Citrix or on 10x. Can't reproduce the same behavior in VS or Notepad++ though.
Overall it seems well-made and (outside a few sharp corners) comes with a lot of polish, but for me the "speed over quality" approach to parsing is not a good fit for my daily C++ needs. I might try it a bit more for those "let me really quickly look up this detail a colleague is asking about" use cases, but with the current approach I won't use it for editing.
- stewartlynch8 4y agoThanks for the feedback. Templates are supported fairly well, but the one missing piece is function overloading which isn't supported yet. Strangely it hasn't come up as much of an issue yet. There's a bug for it here: https://github.com/slynch8/10x/issues/259 https://github.com/slynch8/10x/issues/259 It sounds like you may have the Control W key mapped multiple times in the key mapping file? STL include paths should be automatically added, I'll check that. I'll add those other bugs as well. Thanks again.