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

readme: Initialize. #5

Merged
merged 1 commit into from
Jan 18, 2022
Merged

readme: Initialize. #5

merged 1 commit into from
Jan 18, 2022

Conversation

Ambrevar
Copy link
Member

No description provided.

@kchanqvq
Copy link
Collaborator

I'm not sure if CCL does any typecheck -- on my machine it doesn't seem to do any and probe-ftype is basically an n-op. Can you confirm?

@Ambrevar
Copy link
Member Author

Good catch. CCL does support compile-time type-checking though, it's just that the declare in probe-ftype does not do the trick here.

See this CCL session:

> (declaim (ftype (function (number) number) foof))
> (defun foof (n) (* 2 n))
> (compile nil (lambda () (foof "foo")))
;Compiler warnings :
;   In an anonymous lambda form: Type declarations violated in (THE NUMBER "foo")
#<Anonymous Function #x302000E24CBF>
NIL
NIL

@kchanqvq
Copy link
Collaborator

Interesting. Let me try to figure out a probe-ftype that also works on CCL.

@Ambrevar
Copy link
Member Author

I've updated the readme to remove CCL mention for now.
This should be OK to merge, we can take care of CCL in a separate issue.

@kchanqvq
Copy link
Collaborator

It seems that it's hard to get CCL check a function definition. Probably because built-in functions (e.g. *) do not have type declarations?

> (declaim (ftype (function (string) string) foof))
> (defun foof (n) (* 2 n))
> (compile nil (lambda () (foof "foo"))) ;; no error
> (compile nil (lambda () (* 2 "foo"))) ;; no error

Looks kind of hopeless...

@kchanqvq kchanqvq closed this Jan 18, 2022
@kchanqvq kchanqvq reopened this Jan 18, 2022
@kchanqvq kchanqvq merged commit 3620f87 into master Jan 18, 2022
@Ambrevar Ambrevar mentioned this pull request Jan 18, 2022
@aadcg aadcg deleted the readme branch November 27, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants