Skip to content

[Feature]: More explicit description when printing the type of the struct. #49

@KaEunice

Description

@KaEunice

Problem statement

It is frustrating when struct type is printed as plain text and it easily blends in with other printed text.
`import math;
import network;

struct Person {
name: string,
email: string
}

impl Person {

fun get_name(self) -> string {
    return self.name;
}

fun get_email(self) -> string {
    return self.email;
}

}

fun main() -> void {

let p: Person;

print("Hello World!\n");
print(type(p));   

}

main();`

Prints
"Hello World!
Person"
Where the type name 'Person' can easily be mistaken for simple text.

Proposed solution

maybe add "<< >>" ??

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions