On this page:
?
?*
16.1 Untyped versions of not-implemented-yet
7.7

16 not-implemented-yet

Georges Dupéron <georges.duperon@gmail.com>

syntax

(? type expr ...)

Can be used as a placeholder for an expression returning type. This form throws an error at run-time, but will allow the program to typecheck so that the developer can focus on other parts without a myriad of type errors, and can come back to implement the ? placeholders later.

The expr ... expressions are included within a lambda function, after the (error "Not implemented yet"), so Typed/Racket’s dead code detection will ignore most type errors within those expressions. This makes ? useful as a joker to temporarily ignore type errors within the expressions, while annotating them with the type they should normally have once they are fixed.

syntax

(?* expr ...)

Can be used as a placeholder for an expression returning Nothing. This form throws an error at run-time, but will allow the program to typecheck so that the developer can focus on other parts without a myriad of type errors, and can come back to implement the expressions marked with ?* later.

The expr ... expressions are included within a lambda function, after the (error "Not implemented yet"), so Typed/Racket’s dead code detection will ignore most type errors within those expressions. This makes ?* useful as a joker to temporarily ignore type errors within the expressions. ?* is also useful as a joker to allow the whole (?* expr ...) expression to be used as an argument to nearly any function, as it has the type Nothing, i.e. "bottom", which is a subtype of (nearly) all other types (no value has the type Nothing, i.e. it is the return type of functions which never return, which is the case here, since ?* always throws an error at run-time.

Caveat: the Nothing type can propagate (when Typed/Racket encounters a function called with Nothing as the type of one of its arguments, it may mark the return value of that function as Nothing too, since the call may never happen). This means that other parts of the code may be considered dead code, and type errors in these other parts may be ignored.

16.1 Untyped versions of not-implemented-yet

 (require phc-toolkit/untyped/not-implemented-yet)
  package: phc-toolkit