hd-lang

A Tour of hd

Each page introduces a few features, each with a small example, and gives you a program to run and change beside it. Most pages end with one change to try, which shows the error hd gives.

Start the tour

Contents

  1. HelloScripts · Values inside strings
  2. Values and bindingsNumber literals · := and let · Conversions · Names in strings
  3. FunctionsParameters and results · if gives a value · Pipes
  4. Lists, maps, and loopsLists · Maps · Lookup · for loops · Comprehensions
  5. Closures and iteratorsClosures · Lazy iterators · Tuples
  6. StructsDeclaring a struct · Writable fields · Values copy · Changed copies
  7. ReferencesReading in place · Writing in place · Stored references · Shared objects
  8. Enums and matchEnums · match
  9. Traits and genericsTraits · Implementations · Generic functions
  10. Absence and failureOption · Result · ? · Matching a result
  11. Typed errors@error types · @from · Context · Reports
  12. Derivation@derive · The derived behavior
  13. TestsThe tests: block · Examples, tables, and properties
  14. ModulesFiles are modules · pub · use
  15. RequirementsRequirement rows · main sets the limit · Replacing a provider
  16. SuspensionSuspending functions · Up to main!
  17. Concurrencyjoin! · race! · Timeouts
  18. Where nextFurther reading · One last program

Want the syntax on one page? Read Learn hd in 10 Minutes.