Hi Clément,

On 27/04/2018 10:32, Clément Bera wrote:
> Obviously sets are not as easy to deal with. You cannot mutate empty
> arrays/bytearrays, if you concatenate something it creates a new object.
> You can add things in sets. So you need to be careful... You can make
> the object read-only to avoid issues (MyClassVar beReadOnlyObject).

Sorry, but I can't understand how a class variable could allow you to
use a new literal.

As far as I knew the only way to have new literals was to modify the
compiler.

So if you want #{} to create a new empty set, or #{1 1 2} to create a
Set with 1 and 2 as elements, there is no way to do it.

Or this %{$a -> 1. 'foo' -> false. 'baz' -> #{1 1 2}} to create a
dictionary with such set as literal. :)

Regards,

-- 
Esteban A. Maringolo

Reply via email to