<div dir="ltr"><div class="gmail_default" style="font-size:small">Thank you Nyall!</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 27, 2018 at 12:39 AM, Nyall Dawson <span dir="ltr"><<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
But -- while we're at it -- am I the only one who finds processing<br>
script files in general to be full of a lot of black magic? (Note that<br>
I'm referring to script files here, not proper algorithms). When<br>
refactoring processing to c++ I kept the script syntax unchanged from<br>
2.x as much as possible (with the exception of the sinks, which I<br>
cannot work out how to improve - save for re-creating a dummy<br>
VectorWriter object that wraps a bunch of stuff up). But to me it's<br>
*always* been rather un-python-like how parameters and outputs are<br>
defined in comments, how some variables are automatically created, how<br>
some output variables are expected, etc.</blockquote><div><br></div><div class="gmail_default" style="font-size:small;display:inline">Very good point! Does anyone know the rationale behind the script syntax? Is there any big advantage over the nicely pythonic way of implementing regular Processing algorithms like <a href="https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/SpatialIndex.py">https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/SpatialIndex.py</a>? </div></div><div class="gmail_quote"><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div class="gmail_quote"><div class="gmail_default" style="font-size:small;display:inline">Should we get rid of scripts with their special syntax and just have a way to write </div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">QgisAlgorithm<div class="gmail_default" style="font-size:small;display:inline">​s?​</div></span></div><div class="gmail_quote"><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div class="gmail_quote"><div class="gmail_default" style="font-size:small;display:inline">Regards,</div></div><div class="gmail_quote"><div class="gmail_default" style="font-size:small;display:inline">Anita</div></div><div class="gmail_quote"><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div class="gmail_quote"><div class="gmail_default" style="font-size:small;display:inline">​</div> </div></div></div>