News for hackers. Stuff that matters.
Re:The Flix Programming Language by linter on Sunday November 26, 2023 @01:20AM (#38419592)
Great, But \ is ugly
Re:The Flix Programming Language by subarctic on Sunday November 26, 2023 @01:26AM (#38419619)
That's just what I was thinking too haha. Honestly I really like the rest of the syntax though. (And of course, the type system features look neat but it's easier to have an opinion on syntax.)
Re:The Flix Programming Language by imoverclocked on Sunday November 26, 2023 @01:59AM (#38419737)
Your username matches your comment!

Also, I agree but I'm not sure what I would propose as a better token. Maybe another colon?

def printAndInc(x: Int32): Int32 \ IO =

becomes:

def printAndInc(x: Int32): Int32 : IO =

Or maybe, since functions need something after the \, even for pure functions, we just drop the \ and use the last argument?

def printAndInc(x: Int32): Int32 IO =

Re:The Flix Programming Language by Too on Sunday November 26, 2023 @06:57AM (#38420957)
Why not something human readable? pure vs mut?

Other languages already have readable keywords in the function definition; extends, raises, where, having, Optional, and so on. They don’t feel unnecessarily verbose.

Re:The Flix Programming Language by nrabulinski on Sunday November 26, 2023 @10:13AM (#38422177)
Because they’re working on algebraic effects so obviously IO won’t be the only effect out there. Also because “mut” is even more misleading as it doesn’t capture everything an “IO function” can do, in comparison to a pure function.
Re:The Flix Programming Language by Too on Sunday November 26, 2023 @10:49AM (#38422469)
”mutates IO”? Anything is better than /{}. I don’t know, maybe one gets accustomed to it after a while? It would be rather verbose to write “returns Foo” everywhere. I’m just looking at this with fresh eyes and this aspect of the language is a token-soup. Other parts look neat though.
Re:The Flix Programming Language by nikolay on Sunday November 26, 2023 @01:54AM (#38419716)
And so are forA and forM!