lingua-franca
lingua-franca copied to clipboard
Remove deprecated initializer syntax
state foo: int(42)
introduced a new initializer syntax. Currently, the validator produces a warning if the old initializer syntax is used (e.g., state foo: int(42)
instead of state foo: int = 42
). While this is a good solution for the transition phase, we should convert the warning into an error in a later release.
The only exception is currently the C++ target, where the old syntax is still legal. We should also carefully consider if this syntax is required and completely remove it, if not.
@cmnrd, could you outline the steps required to get this done?
- See that all of our examples, benchmarks, and the website use the new syntax. Afaik, the examples and the website are up to date, but we still have to reformat the benchmarks. For most benchmarks this should be trivial, but for the C benchmarks that use cog for filling in parameters, we need to update the comments as well.
- Update the validator to produce an error when the old syntax is used. Except for the C++, all targets should enforce the
=
initializer syntax. - Cleanup the code generators (if possible). I don't know how exactly this is handled by the code generators at the moment, but if we allow only one syntax for most targets, then perhaps there is an opportunity to remove some conditionals in the code generator that used to distinguish the syntax variants.