2016-09-13 21:00 GMT+02:00 stepharo <stepharo@free.fr>:
Hi nicolai

Why we should not accept

foo
�� �� <func: (3+4) res:0>
�� �� ^ self

and be forced to put around ''

foo
�� �� < func: '(3+4)' res: 0 >
�� �� ^ self

I understand that we store literal but why you do not like it :).

First of all, the old compiler did not accept this. And I am a bit sensitive about changes, we allow a different syntax
just because RB happens�� to allow this (and maybe no one knows why or it just does not happens on purpose).

And another reason, even without my fix, if we don't put quotes around that expression, the reformatting the source will convert this to:

foo
������ <func: #(3 #+ 4) res: 0>
������ ^ self

And, even if (3+4) looks like an expression, it is just a list of literals something like this:

foo
������ <func: ([[[}}}) res:0>
������ ^ self

would be allowed too.

But of course this is only my own opinion :)

We can change it back and maybe add support for the reformatter to not convert it to the literal array #(3 #+ 4) .


nicolai



Stef


�� 60220
19086 do not allow expressions as pragma arguments
�� �� �� �� https://pharo.fogbugz.com/f/cases/19086