Why is there a limit of max 20 parameters to a clojure function
Posted
by GuyC
on Stack Overflow
See other posts from Stack Overflow
or by GuyC
Published on 2010-04-29T07:57:31Z
Indexed on
2010/04/29
10:57 UTC
Read the original article
Hit count: 377
Hi, there seems to be a limit to the number of parameters a clojure function can take.
When defining a function with more than 20 parameters I receive the following:
Obviously this can be avoided, but I was hitting this limit porting the execution model of an existing DSL to clojure, and I have constructs in my DSL like the following, which by macro expansion can be mapped to functions quite easily except for this limit:
(defAlias nn1 ((element ?e1) (element ?e2)) number
"@doc features of the elements are calculated for entry into
the first neural network, the result is the score computed by the latter"
(nn1-recall (nn1-feature00 ?e1 ?e2) (nn1-feature01 ?e1 ?e2) ... (nn1-feature89 ?e1 ?e2)))
which is a DSL statement to call a neural network with 90 input nodes. Can work around it of course, but was wondering where the limit comes from. Thanks.
© Stack Overflow or respective owner