Declarative rules are usually not very good. Every tool must understand
every type of rule, and must be updated when new rule types are introduced.
Plus declarative grammar is either too limiting, or eventually starts
looking like a scripting language itself, and we end up building an
execution environment in every tool.

I think a better path is executing scripts inside other languages, e.g.
* a JavaScript library ran by Java, Python, C++, ...
* a lib that gets compiled into a webassembly for browser, or connected to
other languages via native bindings (less tried path)

The lib would need an API to
* access local data state
* access master OSM DB for additional data
* access other tools like taginfo

Integrating scripting environment may be difficult, but offers far greater
benefits of rule consistency and flexibility.


On Sun, Dec 24, 2017 at 7:30 AM, Colin Smale <colin.sm...@xs4all.nl> wrote:

> The technical differences between java and JS do not preclude generic
> thinking. Consider tzdata[1] for example, which does something analogous
> for time zone data.
>
> The "rules database" can be made portable, in the form of XML or JSON for
> example. The logic for using these rules can be described in a portable
> way. Then you add a set of compliance tests, and publish a reference
> implementation to demonstrate that is is possible to implement it. After
> that, the logic can be implemented in any language you like, checked
> against the compliance tests and the bindings published.
>
> Externalising the rules database enables updates and customisations for
> particular reasons. Depending on the specific use case and the associated
> non-functionals, validation could possibly be offered as a cloud service
> (not necessarily by OSM).
>
>
> //colin
>
> [1] https://en.wikipedia.org/wiki/Tz_database
>
> On 2017-12-24 12:18, James wrote:
>
> ID is javascript, JOSM is java. So right there I already see a
> intercompatibility issue
>
> On Dec 24, 2017 6:12 AM, "François Lacombe" <fl.infosrese...@gmail.com>
> wrote:
>
>> Hi
>>
>> Here is an idea I got regarding tagging validation in editors (iD, JOSM,
>> others).
>> Subsequently to wiki proposal voting and cleanups, it's currently
>> necessarily to open issues in each editor repository to ask for new tagging
>> validation rules.
>>
>> It can sometimes be time consuming to develop those new rules and such a
>> work is done independently by each project maintainer. While each project
>> have its own specific components, background logic is the same.
>>
>> Would a new lib called like osmtagvalidator or so in charge of doing
>> conform validation to wiki be useful?
>> It may be shared by any project involved in osm editing and preserve its
>> resources for other valuable developments.
>>
>> For me, validation doesn't prevent users to use tags they want, but only
>> warn them about possible mistakes.
>>
>> How would devs and users feel about this?
>>
>> All the best
>>
>> François
>>
>> _______________________________________________
>> talk mailing list
>> talk@openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/talk
>>
>
> _______________________________________________
> talk mailing list
> talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk
>
>
> _______________________________________________
> talk mailing list
> talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk
>
>
_______________________________________________
talk mailing list
talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk

Reply via email to