Dhall-lang: Feature request (or just a question): Text/fold, Text/length, Text/build

Created on 14 Aug 2018  路  3Comments  路  Source: dhall-lang/dhall-lang

I'm very interested in why Text/fold, Text/length, and Text/build are not available, and even not implementable (as long as I read the docs) in Dhall.

Do you think they are unnecessary for a configuration languages?
I think for example Text/null would be useful to show default value when a text is empty:

if Text/null someText then "default text" else someText

You mean I should use Optional Text in such a case?

All 3 comments

@igrep

You mean I should use Optional Text in such a case?

Yes, in this case I'd use Optional Text, so your example would be:

Optional/fold Text someText Text (位(t : Text) -> t) "default text"

Do you think they are unnecessary for a configuration languages?

Usually this question comes up wrt Text/equals (it's the same problem class of null, build, etc), so you might find the discussion in #164 interesting

I got the overall point of why the features aren't implemented. Closing.
Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saurabhnanda picture saurabhnanda  路  4Comments

RyanSiu1995 picture RyanSiu1995  路  3Comments

michalrus picture michalrus  路  5Comments

philandstuff picture philandstuff  路  4Comments

philandstuff picture philandstuff  路  4Comments