
I also constantly forget keybindings (and things in general) that I don’t use often enough, but at least with quickscript it’s easy to find out a keybinding by checking in the Script menu.

Also, I personally find the blue boxes behaviour of following the cursor annoying because I often want to keep the signature of one function as I write the arguments, but then it switches to other things as I type. @notjack I’d need more info on what you’d like, to see if I can do something about it

I pretty just want exactly what IntelliJ does.

this appears at the point you type .
, is that right?

Yup

Once I start typing the arguments, it (sometimes?) creates a second popup above what I’m writing to help me keep track of where I am in the argument list without preventing me from using autocompletion for constructing each argument expression.

Ah, what you firstly want is to be reminded about where you are in the arg list? If I (manage to) modify the def-signature quickscript to write in bold the current argument, would that be better?

Bolding the current argument is definitely a good idea IMO

I’m trying to capture a screen recording of what intellij does as I type that expression

Excel bonding the current argument

Clever, it seems to know to only show the popup with the list of argument names for method calls where I pause to think after typing the method name but before I start typing the arguments.


Notice that it doesn’t change from showing the new Plan<>()
constructor’s signature to the add()
method’s signature while I’m typing nextAction
, or to the perform()
method’s signature while I’m typing predicatedState
. It only changes if I pause for a second before typing the arguments.

Which makes sense. Because if I’m pausing, it means I’m not sure what comes next :p

Oh also, I’m just pressing tab to get the autocompletion to fill in what it thinks comes next.

Ok thanks. Quickscript doesn’t receive keystroke events, so it might be better to modify the drcomplete plugin, or I’ll need to modify Quickscript to trigger scripts on keypresses too

+1 adding keypress triggers to quickscript

changing the keywords of keyword arguments already breaks callers, right?

It looks like both foldl
and foldr
in Racket pass the accumulated state as the second argument, matching cons
.
Personally, in order to visualize what’s going on in the list, I like for foldl’s accumulator to take (accumulated-state, element) since the accumulation is approaching from the beginning of the elements. Likewise, I prefer for foldr’s accumulator to take the state as the last argument since the accumulation is approaching from the end. But I’m not too concerned about whether I can pass something like cons
directly to either one. I always pass a lambda expression, which I prefer because it gives me a place to set a breakpoint and because it makes it very clear how many optional arguments I’m making use of in that location.

Yes, which is why choosing whether an argument should be a keyword argument or a positional argument is a trade-off based on how important you think the argument name is to callers. I don’t want every single argument name to be part of my exposed API surface, just the ones that are important.

Oh yeah, I guess “even when the function is not designed with keywords in mind” tends to be a bad idea, since a detail that wasn’t explicitly designed for may be subject to change when the designer finally gets around to giving it some attention.
In my head, I automatically understood the idea as “add a new kind of argument that can be passed in both positional and keyword-based ways.” Library authors who don’t want to expose arguments this way don’t have to.
In context of this kind of feature, there may be a subcommunity norm to design APIs so that every argument can be keyword-specified. In the worst case, this norm may lead library authors to overcommit with their name choices and end up with libraries they regret. But if library authors pay enough attention up front, they can encode their indecision about an argument’s name by using a positional-only argument. Then they can upgrade it to allow keyword use in a future release once they’ve made a decision.