-
Notifications
You must be signed in to change notification settings - Fork 339
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.
All reactions
It depends on what you mean by "long" type.
Pkl's Ints 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
Replies: 2 comments
-
It depends on what you mean by "long" type.
Pkl's Ints 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
Beta Was this translation helpful? Give feedback.
All reactions
-
I've just double checked and it's true.
Beta Was this translation helpful? Give feedback.