jellylanguage icon indicating copy to clipboard operation
jellylanguage copied to clipboard

Improve `D` (decimal) atom

Open Reconcyl opened this issue 7 years ago • 2 comments

Make D (to decimal) take the ord first if given a character.

Reconcyl avatar Nov 19 '17 21:11 Reconcyl

@ScratchMan544 Why should it take the ordinal of a character and not just the digit the character itself represents ([0-9]) or 0 if the character is not a digit? That's how bit-wise functions (&, |, ^, ~) behave.

GolfingSuccess avatar Nov 20 '17 12:11 GolfingSuccess

Taking the digit the character represents is not a particularly useful operation in this cae – after all, we're converting to decimal, so that would essentially just be an "eval". The reason I chose the ordinal is because that's what I actually found useful when golfing.

Reconcyl avatar Jan 23 '18 00:01 Reconcyl