0

Is struct or create-struct deprecated?. I´ve read here that I should use defrecord instead: https://clojuredocs.org/clojure.core/struct

Thanks R.

1
  • 2
    This doesn’t seem like a useful question and answer. If you’re just interested in whether struct etc. are deprecated in Clojure, anyone can answer that by looking at the documentation. More informative answers stackoverflow.com/a/23148768 and stackoverflow.com/a/4576143 Commented Oct 14, 2017 at 19:41

2 Answers 2

2

According to "Why have both deftype and defrecord?", ...

Overall, records will be better than structmaps for all information-bearing purposes, and you should move such structmaps to defrecord. It is unlikely much code was trying to use structmaps for programming constructs, but if so, you will find deftype much more suitable.

Sign up to request clarification or add additional context in comments.

1 Comment

Alex Miller's thorough answer, referred to in a comment on the question, is much better than this. It starts I consider structs to be effectively deprecated so I don't use them at all.
0

According to the Clojure v1.8 API documenatation the struct and create-struct are not deprecated.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.