carbon-language / carbon-lang

Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
https://github.com/carbon-language/carbon-lang/blob/trunk/README.md
Other
32.31k stars 1.48k forks source link

Add a basic Core.Print function for ints. #4078

Closed jonmeow closed 5 days ago

jonmeow commented 6 days ago

We'd been discussing that explorer remains necessary for print, and I was wondering if this kind of approach would be okay (we probably want this to work, based on #2110, albeit with more overloads -- but I don't think there's a good way to support overloads at the moment).

╚╡../bazel-bin/examples/sieve
2
3
5
7
11
13
17
19
23
29
31
37
41
43
...
jonmeow commented 5 days ago

As a strictly short-term thing, I think this is fine. Maybe there should be a TODO somewhere to remove this once we can implement Print in the language instead?

Done