Long type #567
-
Is it planned to support long type? Such values must be stored now in String fields. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It depends on what you mean by "long" type. Pkl's Pkl currently doesn't support fixed-sized ints greater than 64 bits (e.g. Int128), nor does it support arbitrarily sized ints (i.e. big ints), and these are things that we are considering supporting in a future release. That being said, there is an experimental package that provides a |
Beta Was this translation helpful? Give feedback.
-
I've just double checked and it's true. |
Beta Was this translation helpful? Give feedback.
It depends on what you mean by "long" type.
Pkl's
Int
s are 64-bit signed integers, which corresponds to what some languages call "long" (e.g. Java).Pkl currently doesn't support fixed-sized ints greater than 64 bits (e.g. Int128), nor does it support arbitrarily sized ints (i.e. big ints), and these are things that we are considering supporting in a future release.
That being said, there is an experimental package that provides a
UInt128
implementation if you need it: https://pkl-lang.org/package-docs/pkg.pkl-lang.org/pkl-pantry/pkl.experimental.net/current/u128/index.html