HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
clojure
core.contracts
Clojure2013–2014
clojure / core.contracts

core.contracts

Contracts programming

3Distinct people
4Mentions
0Explicit recommenders
130GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Contracts programming

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week4 dated mentions

Observed mentions: 2013-06-13 17:33:43 UTC to 2014-01-19 20:50:23 UTC. Weeks start Monday, UTC.

0122013-06-10 00:00:00 UTC to 2013-06-17 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJun 102013-06-17 00:00:00 UTC to 2013-06-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-06-24 00:00:00 UTC to 2013-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-07-01 00:00:00 UTC to 2013-07-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-07-08 00:00:00 UTC to 2013-07-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-07-15 00:00:00 UTC to 2013-07-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-07-22 00:00:00 UTC to 2013-07-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-07-29 00:00:00 UTC to 2013-08-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-08-05 00:00:00 UTC to 2013-08-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-08-12 00:00:00 UTC to 2013-08-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-08-19 00:00:00 UTC to 2013-08-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-08-26 00:00:00 UTC to 2013-09-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-09-02 00:00:00 UTC to 2013-09-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-09-09 00:00:00 UTC to 2013-09-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-09-16 00:00:00 UTC to 2013-09-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-09-23 00:00:00 UTC to 2013-09-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsSep 232013-09-30 00:00:00 UTC to 2013-10-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-10-07 00:00:00 UTC to 2013-10-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-10-14 00:00:00 UTC to 2013-10-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-10-21 00:00:00 UTC to 2013-10-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-10-28 00:00:00 UTC to 2013-11-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-11-04 00:00:00 UTC to 2013-11-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-11-11 00:00:00 UTC to 2013-11-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-11-18 00:00:00 UTC to 2013-11-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-11-25 00:00:00 UTC to 2013-12-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-02 00:00:00 UTC to 2013-12-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-09 00:00:00 UTC to 2013-12-16 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2013-12-16 00:00:00 UTC to 2013-12-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-23 00:00:00 UTC to 2013-12-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2013-12-30 00:00:00 UTC to 2014-01-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-06 00:00:00 UTC to 2014-01-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-13 00:00:00 UTC to 2014-01-20 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsJan 13

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jun 102013-06-10 00:00:00 UTC2013-06-17 00:00:00 UTC101
Jun 172013-06-17 00:00:00 UTC2013-06-24 00:00:00 UTC000
Jun 242013-06-24 00:00:00 UTC2013-07-01 00:00:00 UTC000
Jul 12013-07-01 00:00:00 UTC2013-07-08 00:00:00 UTC000
Jul 82013-07-08 00:00:00 UTC2013-07-15 00:00:00 UTC000
Jul 152013-07-15 00:00:00 UTC2013-07-22 00:00:00 UTC000
Jul 222013-07-22 00:00:00 UTC2013-07-29 00:00:00 UTC000
Jul 292013-07-29 00:00:00 UTC2013-08-05 00:00:00 UTC000
Aug 52013-08-05 00:00:00 UTC2013-08-12 00:00:00 UTC000
Aug 122013-08-12 00:00:00 UTC2013-08-19 00:00:00 UTC000
Aug 192013-08-19 00:00:00 UTC2013-08-26 00:00:00 UTC000
Aug 262013-08-26 00:00:00 UTC2013-09-02 00:00:00 UTC000
Sep 22013-09-02 00:00:00 UTC2013-09-09 00:00:00 UTC000
Sep 92013-09-09 00:00:00 UTC2013-09-16 00:00:00 UTC000
Sep 162013-09-16 00:00:00 UTC2013-09-23 00:00:00 UTC000
Sep 232013-09-23 00:00:00 UTC2013-09-30 00:00:00 UTC000
Sep 302013-09-30 00:00:00 UTC2013-10-07 00:00:00 UTC000
Oct 72013-10-07 00:00:00 UTC2013-10-14 00:00:00 UTC000
Oct 142013-10-14 00:00:00 UTC2013-10-21 00:00:00 UTC000
Oct 212013-10-21 00:00:00 UTC2013-10-28 00:00:00 UTC000
Oct 282013-10-28 00:00:00 UTC2013-11-04 00:00:00 UTC000
Nov 42013-11-04 00:00:00 UTC2013-11-11 00:00:00 UTC000
Nov 112013-11-11 00:00:00 UTC2013-11-18 00:00:00 UTC000
Nov 182013-11-18 00:00:00 UTC2013-11-25 00:00:00 UTC000
Nov 252013-11-25 00:00:00 UTC2013-12-02 00:00:00 UTC000
Dec 22013-12-02 00:00:00 UTC2013-12-09 00:00:00 UTC000
Dec 92013-12-09 00:00:00 UTC2013-12-16 00:00:00 UTC101
Dec 162013-12-16 00:00:00 UTC2013-12-23 00:00:00 UTC000
Dec 232013-12-23 00:00:00 UTC2013-12-30 00:00:00 UTC000
Dec 302013-12-30 00:00:00 UTC2014-01-06 00:00:00 UTC000
Jan 62014-01-06 00:00:00 UTC2014-01-13 00:00:00 UTC000
Jan 132014-01-13 00:00:00 UTC2014-01-20 00:00:00 UTC202

What Hacker News says

4 sources
Most of the complaints in this article boil down to "macros are too powerful." I think this is the key part of the argument: "A smart programmer is not necessarily an empathetic language designer; they are occupations that require different skillsets. Giving any programmer on your team the ability to arbitrarily extend the compiler can lead to a bevy of strange syntax and hard-to-debug idiosyncrasies." There are at least 2 counter-arguments to this: 1.) in the simplest case, just restrict the use of macros. A team can easily adapt the rule that only the most experienced engineer on the team is allowed to write or approve macros. (And in my experience, the need for macros is fairly rare. I think my ratio is something like 100 or 200 normal functions for every macro that I write.) 2.) macros allow all kinds of interesting type checking, and
Read the rest
data structure validation, and therefore they make it surprisingly easy to validate data and types as your data and/or vars get passed around your system. Consider all of these very interesting tools you can use in the world of Clojure: Prismatic Schema which allows validation that a data structure matches a schema of (possibly nested) types: https://github.com/prismatic/schema and this now offers coercion, which makes this fantastic for importing JSON from other sub-systems or outside vendors: http://blog.getprismatic.com/blog/2014/1/4/schema-020-back-w... (I assume you could easily validate before giving data to Liberator to export your data while conforming to your schema: http://clojure-liberator.github.io/liberator/ ) There is work being done on an optional type system: https://github.com/clojure/core.typed Much effort has been made to make contract programming easy in Clojure: https://github.com/clojure/core.contracts But also I find the built-in syntax for writing pre and post assertions is clean and easy to use: http://blog.fogus.me/2009/12/21/clojures-pre-and-post/ In short, there are an abundance of mechanisms available with Clojure which help facilitate the enforcement of any kind of schema or contract, and some of these tools are enabled (and their syntax is made clean) thanks to macros. In short: macros can be used for evil, but they can also be used for good. They are very powerful, so everyone should be judicious about their use, but there is no reason to argue that macros render a Lisp unfit for programming in the large. Having said all that, I'll remind everyone that the ultimate counter-argument is offered by Paul Graham, in his essay "Beating the averages": http://www.paulgraham.com/avg.html If that essay does not convince you of the value of macros/lisp, then nothing will.
In Lisp: More is less
About this: "until you get some optional typing" There is work being done on an optional type system: https://github.com/clojure/core.typed There are also some interesting experiments in enforcing specific data structures: https://github.com/prismatic/schema Much effort has been made to make contract programming easy in Clojure: https://github.com/clojure/core.contracts And if you would feel the urge to respond with something like "why is such important functionality in a library", I'll point out enforcing pre and post conditions (on a function) has a nice syntax that is part of the language: http://blog.fogus.me/2009/12/21/clojures-pre-and-post/ I find that every time I read an article about Scala I am left wondering "Why don't these people just use Clojure?"
In Scala – 1 Star Would Not Program Again

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.