Automatically underscore large numbers in editor

A feature I’d like to see in Hopscotch is: automatically underscore large numbers

I’d use it for this type of project: projects involving money

Here are some examples of Hopscotch code that could be improved if we had this:

can you read how many 0s this is? I didn’t think so

Here is an example design I’ve made:

1_000_000

I’ve seen something similar in another programming languages, it looks like this:

you can do this in a lot of programming languages I think, I know at least swift

  • Good idea
  • Ehhh I don’t think so
  • Maybe

0 voters

11 Likes

That would be a good idea. I have the same problem most of the time (first)

4 Likes

I usually just count how many 0s I type in but I guess this could help a little

6 Likes

Yeah I am making a business simulator and I had to put waaaay to many zeros. This is a really good idea

4 Likes

Idk what the system is in the US but isn’t it smth like 4,000,000,000?
Maybe it could be that instead of underscores?

10 Likes

Instead of underscores, it could be “,” “.” or “-“

5 Likes

But it should be automatic so you can just type another zero and it would just go up a place

5 Likes

In France they put a space so it would be 4 000 000 000

8 Likes

Really? Cool.

5 Likes

That’s the whole point. Automatic spacing.

I’d personally prefer 400_000 instead of 400,000 because I feel as the underscores would be easier to read at a quick glance

7 Likes

I’d rather have it insert a small space that isn’t copyable

6 Likes

This is a pretty good idea actually, I like it!

4 Likes

Yeah I agree.

I like E’s idea too, but that may be harder to read than the _

7 Likes

In merca we use “,”’s

4 Likes

Commas are common in the US, which is where hopscotch is based. So that’s probobly what would happen. Unless they decided to do it based on location, which I highly doubt will happen btw.

5 Likes

Do you mean scientific notation? Cuz that would be nice

4 Likes

Yes I know I live in the US. I don’t normally find commas being used in programming languages but rather underscores or spaces

6 Likes

Yeah, in Python you can type underscores for big numbers.

4 Likes

I most often see underscores/they are the easiest to read for me

6 Likes

In Sweden you actually sometimes just type it with no spaces or anything like 4000000000 etc

5 Likes