String lang-lib function, join doesn't work with join() syntax but only with 'join() #31830
Replies: 4 comments 3 replies
-
Haven't we discussed this in our last chat? I have a long memory of this. I think it is not a question only about "join". We have to decide how we will handle all the lang-lib functions that have the keyword names. "map" is a special case already. In my view, we should have similar behaviour. Either we have to special case all the matching cases or remove the special case handling for "map". |
Beta Was this translation helpful? Give feedback.
-
With this: ballerina-platform/ballerina-spec#34, We'll relax more keywords to be used as identifiers |
Beta Was this translation helpful? Give feedback.
-
Updating the discussion. We allowed |
Beta Was this translation helpful? Give feedback.
-
Guys, later we had a chat on this since we came across some other cases as well. It seems, it is impossible to special case all these scenarios at the LS level because we have to hack multiple places to handle not only completions but also references, go-to definition and renaming. It could lead to a nightmare to handle all these cases at LS. At the same time, this could turn into a critical blocker in near future, specifically for Choreo use cases because the suggestions provided at source view and expression editor are incorrect (we suggest without the single quote) and could break the code. As I understood, we have to come up with the proper plan/design to handle these cases seamlessly. @sameerajayasoma @hasithaa Appreciate it if we could prioritize this (if GA is not a viable option then we should consider the immediate update at least) |
Beta Was this translation helpful? Give feedback.
-
Array langlib function,
map()
works fine withmap()
as well as'map()
syntax. But, the string lang-lib function,join()
shows an error withjoin()
synataxNote: it is working fine with
'join()
Shouldn't we allow both
join()
and'join()
with strings?Related issue: #29494
@hasithaa @mohanvive @rdhananjaya @nadeeshaan @pubudu91 any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions