News for hackers. Stuff that matters.
Re:Main is usually a function, so when is it not? (2015) by pcstl on Monday June 14, 2021 @02:06PM (#27505993)
In Haskell, main is a value, not a function. This is sometimes overlooked because in Haskell "values" can be thought of as 0-parameter functions and functions can be used as values, so everything sort of blends together, but I find it gives some fascinating insight into how lazy programming changes things up.
Re:Main is usually a function, so when is it not? (2015) by chowells on Monday June 14, 2021 @02:46PM (#27506575)
I like Haskell as much as anyone, but this is pretty non-responsive. "main is usually a function" is a gcc warning, and the whole joke is that "usually" leaves some pretty broad questions. This post answers some of them.