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

[RFC] Add a printf function to the ecma-sl language #10

Open
filipeom opened this issue Jan 3, 2024 · 0 comments
Open

[RFC] Add a printf function to the ecma-sl language #10

filipeom opened this issue Jan 3, 2024 · 0 comments

Comments

@filipeom
Copy link
Member

filipeom commented Jan 3, 2024

C-Style printf

printf "Hello, %s\n" "World"

Pros:

  • Probably can reuse OCaml's format strings to compile our formatter

Cons:

  • Harder to typecheck and unpack arguments

Rust-Style format printer

print("Hello, {}\n", "World")

Pros:

  • Easier to unpack arguments, no need to typecheck

Cons:

  • Harder to compile our format string
@filipeom filipeom changed the title Add a printf function to the ecma-sl language [RFC] Add a printf function to the ecma-sl language Apr 6, 2024
@filipeom filipeom added the RFC label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant