

Thunderbird has matrix support now? 🤯
Thunderbird has matrix support now? 🤯
I think that when it comes to functional programming with effect systems, unison is currently the closest to showing how it is actually done. Koka and languages like Effekt are of course very nice, but they don’t show much going for them besides the example nondeterminism and exception effect. Verse, that language that was going to be used as Fortnite’s scripting language, also plans on adding these effect systems a la Koka.
Overall, I think one of 2 things will happen:
Alright as someone who likes Haskell and has dabbled in unison before, I believe I can answer all these questions for you:
- Why is
helloWorld
there twice?
It is common in languages like haskell and ocaml to first mention the type of a function, so in this case:
helloWorld
is '{IO, Exception} ()
. That is it’s type signature (important for later)helloWorld
is \_ -> println "Hello, World!"
- What’s the
'
for?- What are the
()
for?
Here is where I have to get into the nitty gritty of how unison actually works. Unison has what programming language researchers call an effect system. The type signature of helloWorld
indicates that it can perform the IO
and Exception
types of side effects, and these need to be handled. (in this case, they are handled by the compiler, but other types of side effects can be handled by the programmer themselves)
However, for reasons Unison does not like dealing with eagerly evaluated non-function values with side effects. For this reason, there is '
. Essentially, what it does is turn a value into a function that accepts ()
as it’s argument. We could therefore say that the type signature of helloWorld
is also () -> {IO, Exception} ()
. The last ()
indicates that, next to it’s IO
and Exception
side effects, it also returns ()
as a value. This is because, in functional programming languages, all functions need to return values (or run infinitely, but that is for another topic)
Now I’ve been used to functional programming for quite a while now, so things that seem natural to me can be absolutely woozy for anyone not used to this paradigm. So if anything still feels vague to you feel free to comment
Meh, I think the people that are interested in the spacebattles thread will have found it through other means like HN. As for discussing the events as they unfold I think that’s best left to the forum itself, rather than discuss it at a proxy on Lemmy
For anyone interested, there is a forum thread which is the closest thing we have to a live blog, along with the thread author’s opinions on how veritable the claims of each party currently known to try and replicate the study are.
Um ackshually that’s a metro, not a train 🤓