On 06/06/2014 7:39 PM, Steven Schveighoffer wrote:
On Fri, 06 Jun 2014 06:14:30 -0400, Rene Zwanenburg
<renezwanenb...@gmail.com> wrote:


Immutables should be usable at compile time and not allocate a new
instance on every use when in module scope.

I was about to say this. But immutable can have its own set of issues.
If you want strictly compile-time generation of data, then immutable is
the way to go.

But if you want to use it at runtime as well, immutable can hamper some
things. I'm sure your example is a very small or reduced snippet of what
you are actually doing.

-Steve

I re-factored my actual code to not need the slices at all as no matter how I tried to use them at compile time it broke one of my invariants.I now have enums that I can use at compile time to generate more enums (via set operations, etc) and at runtime, so I'm happy.

A...

Reply via email to