Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8092873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:22:48+00:00 2026-06-05T20:22:48+00:00

What is the difference between proxy and reify? I have some example code: (.listFiles

  • 0

What is the difference between proxy and reify? I have some example code:

(.listFiles (java.io.File. ".")
  (proxy
    [java.io.FileFilter] []
    (accept [f]
      (.isDirectory f))))

(.listFiles (java.io.File. ".")
  (reify
    java.io.FileFilter
    (accept [this f]
      (.isDirectory f))))

the result is same, when use proxy or reify, what is better?

Update:

I found something:

  • proxy no need the this as first parameter.
  • proxy support superclass.
  • proxy support arguments.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:22:49+00:00Added an answer on June 5, 2026 at 8:22 pm

    From Clojure.org’s overview of data types:

    The method bodies of reify are lexical closures, and can refer to the surrounding local scope. reify differs from proxy in that:

    • Only protocols or interfaces are supported, no concrete superclass.
    • The method bodies are true methods of the resulting class, not external fns.
    • Invocation of methods on the instance is direct, not using map lookup.
    • No support for dynamic swapping of methods in the method map.

    The result is better performance than proxy, both in construction and invocation. reify is preferable to proxy in all cases where its constraints are not prohibitive.

    Source: http://clojure.org/datatypes

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the difference between the Facade , Proxy , Adapter , and Decorator
Can you please describe an example indicating difference between Public and Private Cache-Control in
In case of the Proxy Design Pattern , What is the difference between JDK's
What is the difference between SIP response code 407 and HTTP response code 407
//Difference between 2 dates This function works well but display wrong time format. Pls
What doing SoapHttpClientProtocol in webservices?what is difference between proxy class and SoapHttpClientProtocol?
I have written an HTTP proxy that does some stuff that's not relevant here,
difference between hash code and reference or address of an object?
The difference between Chr and Char when used in converting types is that one
What is main difference between INSERT INTO table VALUES .. and INSERT INTO table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.