question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

why i hate the dot

See original GitHub issue

hi guys !!

PS> 1.000.000.000
PS> # NOT RETURN ANYTHGING

PS> perl6 -e 'say 1_000_000_000'
1000000000


PS> @'
>> fn main() {
>>  let s = 1_000_000_000;
>>  println!("{}",s);
>> }
>> '@ > ./num.rs

PS> rustc .\num.rs

PS> ./num.exe
1000000000

in this example i compared between rust, raku and PS…like you see rust and raku use “_” underscore to separate betwwen number and its much clean…but in PS with “.” dot it not return anything.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
vexx32commented, Mar 7, 2021

PowerShell doesn’t have a number separator like that. I have previously proposed to add an underscore numeral separator, but it was vetoed during review of the PR a year or two back, I think.

When you do 1.000 PowerShell sees that as a floating point number with the value 1.000. If you then attempt to use another dot, PowerShell assumes you want to access a property, but 1.000 as a numeric value has no property named .000 and so it will return $null, and further property access from that point will continue to return $null.

1.000.000.000 tells PowerShell:

  1. make a number, 1.000 (floating point, double)
  2. access the property of that number called 000 (null)
  3. access the property of that value called 000 (null again)
1reaction
ShrykeWindgracecommented, Mar 11, 2021

@mklement0 Indeed, I forgot about the context here, and my comment was harsh - and uncalled for; please accept my apologies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hate the Dot
A New Approach To Menstrual Education ... Hate the Dot provides curated in-person and virtual workshops to schools and universities, commercial, not for...
Read more >
Hate The Dot | New York NY
Hate The Dot, Brooklyn, New York. 261 likes. We are a social mission dedicated to educate and raise awareness on all things menstrual...
Read more >
Hate the Dot presents
Our next cohort starts on January 5th, 2023. ​. ​Schedule an Intro Call​. You must schedule an intro call to join the course....
Read more >
About Hate The Dot! - Social Enterprise company in United ...
Hate The Dot is a monthly subscription box for women on their periods providing 100% organic pads and/or tampons and complimentary items like...
Read more >
Why I hate the dot dot dot …
By nature – this is an ambiguous form of communication. It leaves the receiver wondering what was un-said in your communication. It implies...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found