mariofusco commented on PR #6219:
URL:
https://github.com/apache/incubator-kie-drools/pull/6219#issuecomment-2602808804
> * I cannot find a single character which is suitable for this purpose
(for example, `#` is used for subtype cast), so I chose `##`. Do you think of
any other good candidates?
I cannot think to any better alternative too. I just wonder if reusing an
existing symbol could create any ambiguity. For instance I cannot think to a
situation when using `:` or even better `%` may not work, but it's impossible
to foresee every possible scenarios without giving it a try. If there is any
possibility to create any potential issue, even in future, it's ok for me to
play safer and keep the `##` operator prefix.
> * The fixes for `isA` in `drools-traits` test cases a little annoying.
If I add `isA` to DRLLexer.g4 as builtInOperator, we don't need to fix the test
cases. Shall I do it?
Sorry, but I disagree with @porcelli on this and I'd prefer to keep `isA` a
custom operator, because
1. Traits are no more a core feature of Drools. They are implemented in a
separated module and actually it was quite hard to perform this separation at
time, so I would like to keep it separated, even at the parser level.
2. Traits are an almost unused feature, or at least I'm not aware of any
user or customer using it. Do you?
3. Traits have a complicated (highly dynamic) implementation, and because of
it they are also the only feature that we weren't able to provide also in the
executable model. Also for these reason we repeatedly discussed if we want to
mark them for deprecation (or completely remove).
4. Implementing `isA` as a custom operator will give us a chance to also do
some dogfeeding with this new syntax and have a meaningful way to test it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]