htdp icon indicating copy to clipboard operation
htdp copied to clipboard

[Enhancement] - support `...` in parameter lists as well as function bodies

Open jasonhemann opened this issue 2 years ago • 1 comments

Re-using ... notation to support function templates is a great idea and I love the error messages.

(define (f-on-atom an-atom)
  (... an-atom ...))

In my context, I also use ... in the parameter list of my templates, to signal that the parameter list is also templated, by analogy to the ...s in the function body. It's a slight variation on the HtDP/2e textbook style.

(define (f-on-atom ... an-atom)
  (... an-atom ...))

However, this gives me a compile-time error message, and a pretty unfriendly one to boot.

define: expected a variable, but found a keyword.

It would be nice if my templating style were supported out of the box, and only errored if you try to call that incomplete function. Still an improvement would be a more beginner-friendly error message here.

jasonhemann avatar Oct 24 '22 01:10 jasonhemann

4pm should work just fine tomorrow.

mfelleisen avatar Oct 25 '22 00:10 mfelleisen

Closing as "Won't fix"

jasonhemann avatar Mar 08 '23 23:03 jasonhemann