Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTDP Signatures - missing Image type in BSL #202

Open
klauso opened this issue Sep 23, 2023 · 7 comments
Open

HTDP Signatures - missing Image type in BSL #202

klauso opened this issue Sep 23, 2023 · 7 comments

Comments

@klauso
Copy link

klauso commented Sep 23, 2023

What version of Racket are you using?
8.10

What program did you run?

Images are an important type in the HTDP methodology. If the new signatures are supposed to be usable for teaching, a pre-defined type for images should be available.

(: foo Image)
(define foo (circle 5 "solid" "red"))

One can work around the issue using the predicate facility in signatures, but this does not work in BSL because it uses image? as a higher-order funciton.

(: foo (predicate image?))
(define foo (circle 5 "solid" "red"))
@sorawee sorawee transferred this issue from racket/racket Sep 23, 2023
@mfelleisen
Copy link
Contributor

@sorawee Thanks for the transfer.

Daniel Pattern and I will look into what to do about checked signatures once his test-drive at NU is over. An Image signature has been on our radar screen for a few weeks. (And no checked signatures are not types. They get checked at run time.)

@mikesperber
Copy link
Member

@klauso
Copy link
Author

klauso commented Sep 24, 2023

Any hope that a new version of DrRacket that includes an Image signature will be released before mid of October (which is when my course using HTDP starts)?

@mfelleisen
Copy link
Contributor

@klauso No our release cycle matches the North American college calendar.

@klauso
Copy link
Author

klauso commented Sep 25, 2023

I hope you'll also revise struct signatures in such a way that signatures can be added to struct constructors. My preference for teaching would be something like PLAI's define-type.

@mfelleisen
Copy link
Contributor

(FWIW, I consider this a pedagogical mistake. Your students will confront Python on their first internship; developing mental discipline now will help.)

@klauso
Copy link
Author

klauso commented Sep 25, 2023

But according to that principle, adding signatures at all was already a mistake. But if you do add the option for signatures, you may just as well do it properly. Give the teachers some choices to tailor the teaching language to their own teaching method - that would be my preference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants