Skip to content
This repository has been archived by the owner on Feb 19, 2018. It is now read-only.

CS2 Discussion: Output: CS Octal/Binary Literal as ES2015? #45

Closed
Inve1951 opened this issue Sep 25, 2016 · 4 comments
Closed

CS2 Discussion: Output: CS Octal/Binary Literal as ES2015? #45

Inve1951 opened this issue Sep 25, 2016 · 4 comments

Comments

@Inve1951
Copy link

I'm bringing this up because nobody did so yet.

Numers in CS like 0b1010 and 0o31 currently compile to 0xa and 0x19 respectively.
Doing that conversion during compilation is no longer neccessary since those literals are now natively supported in JS.

Omitting that conversion and outputting as-is could slightly increase the ouput's readability or reveal intention.

@JimPanic
Copy link
Contributor

Since that literally means less code: awesome! ;D

On 25 Sep 2016, at 13:03, Inve1951 [email protected] wrote:

I'm bringing this up because nobody did so yet.

Numers in CS like 0b1010 and 0o31 currently compile to 0xa and 0x19 respectively.
Doing that conversion during compilation is no longer neccessary since those literals are now natively supported in JS.

Omitting that conversion and outputting as-is could slightly increase the ouput's readability or reveal intention.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@GeoffreyBooth GeoffreyBooth changed the title Output CS Octal/Binary Literal as ES6? Output CS Octal/Binary Literal as ES2015? Sep 25, 2016
@GeoffreyBooth
Copy link
Collaborator

Yes, this makes sense.

@JimPanic
Copy link
Contributor

I submitted a PR to the 2 branch in the official repository. Feedback much appreciated!

JimPanic pushed a commit to GeoffreyBooth/coffeescript that referenced this issue Sep 26, 2016
JimPanic pushed a commit to GeoffreyBooth/coffeescript that referenced this issue Sep 26, 2016
JimPanic pushed a commit to GeoffreyBooth/coffeescript that referenced this issue Sep 26, 2016
JimPanic added a commit to GeoffreyBooth/coffeescript that referenced this issue Sep 26, 2016
@coffeescriptbot coffeescriptbot changed the title Output CS Octal/Binary Literal as ES2015? CS2 Discussion: Output: CS Octal/Binary Literal as ES2015? Feb 19, 2018
@coffeescriptbot
Copy link
Collaborator

Migrated to jashkenas/coffeescript#4941

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants