Now we can use l::set
like this:
l::set( 'string1', 'This' );
l::set( 'string2', 'Awesome' );
l::set( 'string3', 'Translation' );
I think it would be easier to have l::set
to also accept an array?
l::set( array(
'string1', 'This',
'string2', 'Awesome',
'string3', 'Translation',
));
What do you think?
It already supports exactly the syntax you proposed.
Does it? If so, awesome! Add it to the docs?
It is implemented and it works for me. Does it for you as well?
Yes, that’s currently missing in the docs. Added to the list.
texnixe
January 26, 2016, 11:50am
6
That’s what I thought as well but when I tested it in the Langkit, it didn’t.
Did not have the time to try it out just yet but it will probably work. (Need to fix panic issues on Splitview for Mac first. Who uses Mac anyway ;))
texnixe
January 26, 2016, 11:55am
8
It does work, in fact, I just copied @jenstornell code from above without thinking, which will not work, it should in fact be a proper associative array:
l::set( array(
'string1' => 'This',
'string2' => 'Awesome',
'string3' => 'Translation',
));
1 Like
I meant it like you have written it. I very often do exactly that typo error for some reason.