Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Long type #567

Closed Answered by bioball
gaborgsomogyi asked this question in Q&A
Discussion options

Is it planned to support long type? Such values must be stored now in String fields.

You must be logged in to vote

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

Comment options

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

You must be logged in to vote
0 replies
Answer selected by gaborgsomogyi
Comment options

I've just double checked and it's true.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /