Skip to content

Improve get-type-of #69

Description

@mnieper

The Cookbook should (as it says) emphasize modern solutions. I wouldn't call the solution

(define (type-of obj)

modern because it loops through a list effectively built at runtime, preventing compiler optimizations. A "modern" solution would use modern macros. :) Or a hardcoded cond expression where the compiler can inline the primitives.

An independent question: What is a compelling use case for the procedure?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions