Replies: 3 comments 1 reply
-
+1 for the improvement. However we need to be mindful that currently it is an ordered list. Making map should also preserve order of the fields since order is important for some operations such as generating hover markup text. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Great! Will go ahead with the change. Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the internal types we have for records and objects, fields are kept as a map (
String
key andBField
value). We previously had aList
for these as well. But this resulted in people writing util methods all over the place for getting a particular field, given a name. This prompted us to change it to a map. Should we consider doing the same in the record and object type symbols in the Semantic API as well?Asking cz I came across similar patterns in lang server as well. e.g.,
ballerina-lang/language-server/modules/langserver-core/src/main/java/org/ballerinalang/langserver/completions/providers/context/FieldAccessContext.java
Line 151 in 60c8333
Beta Was this translation helpful? Give feedback.
All reactions