Unison | A friendly, statically-typed, functional programming language from the future · Unison programming language
![](https://programming.dev/pictrs/image/4563380c-31c9-4128-957b-4e05897f11d7.jpeg)
![](https://programming.dev/pictrs/image/8140dda6-9512-4297-ac17-d303638c90a6.png)
![Unison | A friendly, statically-typed, functional programming language from the future · Unison programming language](https://programming.dev/pictrs/image/b241bcd4-2902-45d0-a505-8d7dc5da1908.png?format=jpg&thumbnail=256)
unison-lang.org
A friendly programming language from the future.
You are viewing a single comment
A friendly programming language from the future.
Although, i would agree with it not necessarily being "friendly", since its a drastically different syntax than many beginners would be used to, the brackets and parenthesis here are not what you think they are.
Unison is a language in the style of Haskell, F#, Purescript, Elm, etc. So that first line is actually type annotations.
In Haskell, this would just be
helloWorld :: IO ()
, meaning a function named "helloWorld" with no arguments and produces what is essentally a potentially-unsafe IO action with a Void return (the empty parenthesis () ).Here in Unison they call the bracket part "abilities" or something. Its saying the same thing as Haskell, but being more explicit in saying it can raise an exception.
Yeah sorry - that's just unnecessarily obtuse. Programming languages just don't need to be that convoluted. Hello world should look something like this:
And when you need complexity, it can be far simpler than Unison (or Haskel). For example:
You don't need the annotation line in Haskell-esque languages, most of the time. Without the annotation, this is Hello World in Haskell: