GulfOfMexico icon indicating copy to clipboard operation
GulfOfMexico copied to clipboard

Localized decimal separator

Open DanTGL opened this issue 1 year ago • 5 comments

One really confusing thing for a lot of developers outside of the US is that they don't use . as a decimal separator.

, is used in several other countries.

So the decimal separator should be based on your country.

In Sweden for example, you would write the following

const const pi = 3,14!

This should also work with classes and variables

Date,now()!

Since functions use commas, these would be replaced with .

function add(a. b) => {
   return a + b!
}

add(1. 2)!

DanTGL avatar Jun 22 '24 14:06 DanTGL

Also arrays

const const scores = [3. 2. 5]!

DanTGL avatar Jun 22 '24 14:06 DanTGL

What happens if 2 of your devs are in different countries?

realeatham avatar Jun 30 '24 14:06 realeatham

What happens if 2 of your devs are in different countries?

They'll need to use a VPN I think. For example, NordVPN, the sponsor of this video. Staying safe online is an ever growing difficulty and you could be exploited by hackers. NordVPN allows you to change your IP address, making you harder to track, securing your privacy. Check out the link in the description to get 20% off for the first two months and thank you to NordVPN for sponsoring this video.

magistau avatar Aug 28 '24 21:08 magistau

What happens if 2 of your devs are in different countries?

Then you make the code multiple time, one for each country

guigui0246 avatar Aug 29 '24 00:08 guigui0246

What you to do is for the the interpreter to obliterate your privacy by collecting your exact GPS location and checks uses that to use . or ,.

ktlknss avatar Nov 23 '24 08:11 ktlknss