capnproto / capnproto-java

Cap'n Proto in pure Java
Other
405 stars 86 forks source link

Alternative to builder pattern and allocation #142

Open gurgl opened 1 month ago

gurgl commented 1 month ago

Just looking at the examples I'm missing single constructor per type, instead of builder pattern. Also the idea you need to allocate elements in a collection feels cumbersome to me. Why just not shuv a List in? Both these approaches rely on mutation which doesn't feel it caters to FP.