|
Boost : |
Subject: Re: [boost] [qvm] Terseness of syntax etc.
From: Asbjørn (lordcrc_at_[hidden])
Date: 2015-12-10 05:43:42
On 10.12.2015 00:58, Emil Dotchevski wrote:
> On Wed, Dec 9, 2015 at 3:41 PM, Vicente J. Botet Escriba <
> vicente.botet_at_[hidden]> wrote:
>
>> Le 09/12/2015 13:43, AgustÃn K-ballo Bergé a écrit :
>>
>>> That said, if I have to write `(v,XY)` instead of `v.XY` I'd rather write
>>> `XY(v)` instead.
>>>
>>>
>> Clearly the operator, is too controversial.
>>
>> Isn't
>>
>> qvm::ref(v).XY()
>>
>> terse enough?
>>
>
> Compared to (v,XY)?
FWIW, there is precedent for using the "v.xyz" style for swizzling, though
without the parenthesis behind. In OpenGL's shading language, GLSL[1], you can write
v = w.xxyy;
This would be equal to
v = (w, XXYY);
in current QVM syntax as I understand it.
[1]: https://www.opengl.org/wiki/Data_Type_(GLSL)#Swizzling
- Asbjørn
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk