Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit toString #25456

Closed
grainier opened this issue Aug 27, 2020 · 2 comments
Closed

Revisit toString #25456

grainier opened this issue Aug 27, 2020 · 2 comments
Assignees
Labels
Lang/LangLib Related to ballerina/lang.* modules Points/8 Equivalent to eight day effort Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.

Comments

@grainier
Copy link
Contributor

$title. Ref: [1].

[1] ballerina-platform/ballerina-spec#499

@grainier grainier self-assigned this Aug 27, 2020
@mohanvive mohanvive added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Aug 27, 2020
@grainier grainier added Lang/LangLib Related to ballerina/lang.* modules Points/8 Equivalent to eight day effort labels Aug 27, 2020
@gimantha gimantha self-assigned this Sep 3, 2020
@gimantha
Copy link
Contributor

gimantha commented Sep 7, 2020

When it comes to implementation, there should be 2 different implementation as per the spec. One is represented by the langlib function toString() which is the direct style of toString(), other one is the langlib function toBalString(), which is the expression style of toString().

Informal style comes into play if we call the toString() on some basic types but direct style of toString() doesn't make sense. For example,

an array of xml: [<d>t</d>, <d>t</d>];

The expression style toString of this array is
[ xml'<d>t</d>', xml'<d>t</d>']

The informal and direct style of this array is
['<d>t</d>', '<d>t</d>']

@mohanvive mohanvive assigned mohanvive and unassigned grainier Sep 17, 2020
@mohanvive
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lang/LangLib Related to ballerina/lang.* modules Points/8 Equivalent to eight day effort Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.
Projects
None yet
Development

No branches or pull requests

3 participants