You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@asibahi: I totally agree. I also would like to propose some kind of bigint literal, to tell the compiler that the given number is of type bigint, e.g.:
@aluanhaddad : Well if it were biginteger, one could directly write BigInteger and simply import System::Numerics.......
I personally think, that bigint is better, as it is shorter 😉
@BrettJacobitz : I (personally) do not think so....
I found it rather confusing the first time I worked with SQL, that bigint == Int64: I thought, that Int64 should be called long in SQL, and that SQL's bigint should be a datatype, which is 'bigger' than a 64Bit Integer number.
@gordanr that's a good point, it won't be a compile time constant but I don't think there's any way of avoiding that. @svick very elegant. No new syntax, and the multiplication symbol is intuitive and correct.
This discussion was converted from issue #805 on September 08, 2020 21:44.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
@asibahi commented on Mon Jun 13 2016
In F#, there is a language-wide alias for
System.Numerics.BigInteger
, which isbigint
.Does this make sense to include in C# at a language level?
@Unknown6656 commented on Mon Jun 13 2016
@asibahi: I totally agree. I also would like to propose some kind of
bigint
literal, to tell the compiler that the given number is of typebigint
, e.g.:@asibahi commented on Tue Jun 14 2016
@Unknown6656 The
bigint
literal in F# isI
, capital. As in:F# doesn't have implicit casting from
int
tobigint
, as it happens@gordanr commented on Tue Jun 14 2016
Very interesting proposal.
@aluanhaddad commented on Fri Jun 17 2016
Shouldn't it be
biginteger
?:bike::house:@BrettJacobitz commented on Thu Jun 30 2016
Could cause confusion for sql server
bigint
which equates toInt64
.@Unknown6656 commented on Thu Jun 30 2016
@aluanhaddad : Well if it were
biginteger
, one could directly writeBigInteger
and simply importSystem::Numerics
.......I personally think, that
bigint
is better, as it is shorter 😉@BrettJacobitz : I (personally) do not think so....
I found it rather confusing the first time I worked with SQL, that
bigint == Int64
: I thought, thatInt64
should be calledlong
in SQL, and that SQL'sbigint
should be a datatype, which is 'bigger' than a 64Bit Integer number.@aluanhaddad commented on Thu Jun 30 2016
How about including
complex
@gordanr commented on Fri Jul 01 2016
I would like to see both bigint and complex in c#. Very nice.
Complex numbers have two parts. What would the complex literal be like?
var z = (2.3, 5.7); // existing syntax, tuple or complex?
Could it be possible?
complex z = 2.3 + 5.7i;
complex z = 2.3 + i5.7;
What is the literal if we use only one part?
complex z = 2.3;
complex z = 5.7i;
complex z = i5.7;
@svick commented on Fri Jul 01 2016
@gordanr It's almost possible already.
Assuming this simple type:
And this
static
using
:You can write:
@gordanr commented on Fri Jul 01 2016
@svick, This is really cool piece of code. Look obvious, but I didn't know that trick. Thank you very much.
I am not sure if 2.3 + 5.7*i is compile time constant.
It is personal opinion, but I think that notation without '*' could be more appropriate.
complex z = 2.3 + 5.7i;
@aluanhaddad commented on Fri Jul 01 2016
@gordanr that's a good point, it won't be a compile time constant but I don't think there's any way of avoiding that.
@svick very elegant. No new syntax, and the multiplication symbol is intuitive and correct.
Beta Was this translation helpful? Give feedback.
All reactions