
What are the options? named arguments like smalltalk, or developer(IDE) support like Excel functions

Depends on the function for me. List functions I forget the order to constantly, because we have a lot of list functions that break the convention that a function primarily related to one data type should take the argument of that type first.

Like, cons is backwards to me.

So a third option; ‘consistency’

And I have on multiple occasions gotten a fold wrong because the fold was designed for functions that take the accumulator first and cons doesn’t do that

I’d say consistency is the first approach I reach for, then named arguments is the second, then IDE tooling I would like to be the third but it’s not quite there yet for racket.

I feel like named arguments should be more popular, but they seem rare, both in Racket racket languages and elsewhere

I often am frustrated by Racket functions that use optional positional arguments where optional keyword arguments would’ve been much more useful.

In DrRacket the blue boxes help but not often enough. But there’s also the def-signatures quickscript which works without check-syntax, and fills the gap for me.

For me what I really miss is an autocompletion popup right next to my cursor that tells me the signature of the suggestions, including the names of function arguments. That eliminates any confusion about argument order I have leftover after relying on consistency for my first intuition and named arguments for known confusing cases.

That’s what def-signatures tells you, althought without autocompletion for now.

Even gives you default values, as long as they can be read from the source

what’s the UX for it like?

A popup right below the identifier. I’ll take a screenshot when I’m on my computer

do you have to ask for it with a hotkey?

Yes. You’d rather it follows what you’re typing?

(Personally I prefer it shows only when asked for)


Predictable argument ordering would be good. It’s interesting you mention cons
since that’s one I’ve never had trouble with because it looks like what’s going on in the list. I like using curry
occasionally, so having arguments in an order that makes sense from a partial application perspective would be good.

I’d really like to see #lang racket
benefit from some Rhombus refactoring also.

When it comes to my own behavior, I know that if I have to remember to ask for it I’ll never use it :p

The curry
example is interesting because the way it pervasively influences argument order is one of the reasons I dislike it compared to fancy-app