[rkward-devel] JS in rkwarddev
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Wed Oct 28 13:54:28 UTC 2015
Hi,
On Tue, 27 Oct 2015 17:02:55 +0100
meik michalke <Meik.Michalke at uni-duesseldorf.de> wrote:
> Am Dienstag, 27. Oktober 2015, 08:29:43 schrieb Thomas
> Friedrichsmeier:
> > Will you be able to cover for()-loops, too?
>
> there you go, for loops are now also supported, in a basic way.
>
> i needed to work around the different syntax, so the current solution
> defines an empty array first, then pushes the given values into it
> and finaly iterates through the array with another helper variable.
> to limit the possibility of accidently using the same var names,
> these have random names. that looks a bit ugly, but what can you do?
>
> i could use a typical use case you have in mind, to optimize this bit.
I was mostly being curious, if you had an idea on this, since, of
course in this example, the syntactic differences are much larger.
Still I suppose your solution should do the trick, esp. considering
that for-loops won't be needed too often (outside optionsets, at least).
Regarding the var names, I'd suggest to use a prefix + counter, instead
of pure randomness. Then at least the var names will make a tiny bit of
sense, if somebody is trying to read them. E.g. "_RKD_for_array_1" and
"_RKD_for_index_1", or something like that.
Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20151028/499914d7/attachment.sig>
More information about the rkward-devel
mailing list