spdegabrielle
2020-12-31 08:11:47

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


notjack
2020-12-31 08:13:47

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.


notjack
2020-12-31 08:14:49

Like, cons is backwards to me.


spdegabrielle
2020-12-31 08:16:12

So a third option; ‘consistency’


notjack
2020-12-31 08:16:13

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


notjack
2020-12-31 08:18:14

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.


spdegabrielle
2020-12-31 08:23:58

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


kellysmith12.21
2020-12-31 08:24:51

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


laurent.orseau
2020-12-31 08:44:05

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.


notjack
2020-12-31 09:49:23

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.


laurent.orseau
2020-12-31 09:53:23

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


laurent.orseau
2020-12-31 09:53:51

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


notjack
2020-12-31 10:02:53

what’s the UX for it like?


laurent.orseau
2020-12-31 11:48:42

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


notjack
2020-12-31 11:50:06

do you have to ask for it with a hotkey?


laurent.orseau
2020-12-31 12:10:05

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


laurent.orseau
2020-12-31 12:10:46

(Personally I prefer it shows only when asked for)


laurent.orseau
2020-12-31 12:40:02

badkins
2020-12-31 14:48:41

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.


badkins
2020-12-31 14:49:36

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


notjack
2020-12-31 22:01:00

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


notjack
2020-12-31 22:08:24

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