Comments (3)
Nice idea. Lets think more. I have this thought that might be useful to get right decision:
- With
B
personally I have first association like "Boolean" of "Binary" and even BTC (BitCoin) since I working a lot with financial systems. 0b
- is already used in Groovy as binary literal- Is anything special with
Ḅ
symbol usage? I mean doesḄ
already used somewhere in context of big numbers? - I even don't like
Big
class namesBigDecimal
andBigInteger
. I think it's wrong to call something "big" or "short". For me correct name is something like Real as used in mathematics notation. But it's not real "Real" since only 10 based number which is bad for precision. - Yes, you right that
G
literal is something strange counter intuitive and yes it has strict association with unit prefixes "giga". - So, why authors of Groovy chose
G
instead ofB
? I found their discussion and in short "There is a potential conflict with Hexidecimal literals and the numeric suffixes B". So for some reason they decided to useG
(probably because biG). Also it was proposed to useM
prefix as in C# but was rejected since "doesn't seem intuitive for BigInteger". - Also .NET languages use
M
prefix fordecimal
which mean like "Money". Actuallydecimal
is fixed size 128 bit so not exactly the same asBigDecimal
. - Also Stephen Colebourne known as author of JavaTime proposed to use
N
prefix. In comments also was proposedT
as "Ten based number".
So it becomes hard to choice literal. But actually should we? Literals are needed to make your life easier when you write a code. But in your plugin you need to show the code. So I would like to propose you just to show BidDecimal
and BigInteger
as usual number:
new BigDecimal("1.0005").add(new BigDecimal(42.42))
is shown as:
1.0005 + 42.42
What do you think about this?
from advancedexpressionfolding.
While I usually dislike inventing new syntax when a working one already exists, G makes me think "giga", not "big". I'd rather see \u1e04, capital B with dot below (think B decimal).
from advancedexpressionfolding.
The latest EAP build supports basic things like
new BigDecimal("1.0005").add(new BigDecimal(42.42))
More complicated case are to be supported later:
new BigDecimal("1.0005").add(new BigDecimal(42.42)).multiply(new BigDecimal(1.0))
from advancedexpressionfolding.
Related Issues (20)
- NullPointerException when calling isReferenceTo
- Memory leak of EditorImpl though AdvancedExpressionFoldingHighlightingComponent.highlighters map
- BUG: File does not load using Arrays.asList(-1)
- It seems broken on IDEA 2019.3 EAP built on October 9, 2019 HOT 6
- three dots instead of every folding HOT 2
- add keyboard shortcut to analyze open file
- Keep syntax highlighting for some folds ?
- Fold short control statements to one line
- Fold short javadoc comments into one line
- when i folded the exception code,it show wrong.
- IDEA 2020.1 support
- Suggestion: Possibility to automatically fold every comment HOT 1
- Incompatible with IntelliJ 2020.2 HOT 3
- Exception: Light files should have PSI only in one project HOT 1
- java.lang.NoClassDefFoundError: sun/misc/FloatingDecimal HOT 1
- What is the latest release ? HOT 3
- Incorrect folding of for loop
- Allow configuration
- Plugin fails to load on the current master builds (212.3987)
- The plugin can't be installed/updated in IDEA 2021.3 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advancedexpressionfolding.