Live data from Hacker News

Flix – A powerful effect-oriented programming language

flix.dev

141–150 of 197 posts

Re: Flix – A powerful effect-oriented programming language

#141
Flix devs:

in the section:

What features are not supported by Flix?

this Feature on the left side:

No Code Before Main

does not match the Reason on the right side:

In Flix, no code is ever executed before main. Flix has no static initializers (or similar constructs) which are difficult to reason about, error-prone, and often lead to buggy code.

you should change the Feature name to:

Code Before Main

Re: Flix – A powerful effect-oriented programming language

#142

Earlier quoted context omitted.

As a non-functional-programming, c-language-familiar person, the syntax look fabulous. It seems like the first functional language I've seen that makes simple things look simple and clear.

It's kind of a bummer that "skins/themes" never caught on for programming languages. You see it once in awhile, I think some compiler people at one of the FAANGs did an OCaml skin/theme/alternative syntax (reason? something). And there's stuff like Elixir that's kind of a new language but also an interface to an existing world (very cool, Valim is a brilliant guy). But you could do it for almost anything. I would lov…

This is a huge thing already, though?

The JVM is a virtual machine for which Java/Kotlin/Scala/Groovy/Clojure/Flix and a dozen others are front end syntax for.

Same with the CLR and C#, F#, Visual Basic, and technically LLVM/GCC if you want to be pendantic.

Re: Flix – A powerful effect-oriented programming language

#143
I'm looking forward to the day where an ml/functional inspired language can be used for real time rendering and game engines, how far are we from that?

Realistically, one could argue it's not the right choice overall, but still, it's an application which would push the boundaries of what those languages have been perceived to have the greatness weakness in. An application which is mostly about handing mutable state with high performance.

Re: Flix – A powerful effect-oriented programming language

#145

I'm looking forward to the day where an ml/functional inspired language can be used for real time rendering and game engines, how far are we from that? Realistically, one could argue it's not the right choice overall, but still, it's an application which would push the boundaries of what those languages have been perceived to have the greatness weakness in. An application which is mostly about handing mutable state w…

possibly a stupid answer (and if so, someone please invoke Cunningham's law and correct me) but -

Isn't Rust ML/functional inspired? The original compiler was in Ocaml, if I'm not mistaken.

Isn't Rust at least somewhat close to being usable for game engines? https://arewegameyet.rs/

Re: Flix – A powerful effect-oriented programming language

#147
post #6

>> Flix is a principled effect-oriented functional, imperative, and logic programming language... >> Why Effects? Effect systems represent the next major evolution in statically typed programming languages. By explicitly modeling side effects, effect-oriented programming enforces modularity and helps program reasoning. Since when do side effects and functional programming go together?

Since the 90s

Re: Flix – A powerful effect-oriented programming language

#148
post #129

I think their DIDYOUKNOW.md file in the source code is worth showing in full, as it describes the language in a more compact form: --- # Did You Know? ## Language Did you know that: - Flix offers a unique combination of features, including: algebraic data types and pattern matching, extensible records, type classes, higher-kinded types, polymorphic effects, and first-class Datalog constraints. - Flix has no global st…

"Controversial: Flix defines division by zero to equal zero." Wait what. Can I read up on the motivation somewhere?

The FAQ (https://flix.dev/faq/#:~:text=Dividing%20by%20zero%20yields%...) links to https://www.hillelwayne.com/post/divide-by-zero/, which is more about Pony, but links to https://xenaproject.wordpress.com/2020/07/05/division-by-zer... which properly explains that it's helpful for proof assistants to define division by zero, with particular reference to Lean. Really it's defining a division-like function (Lean calls it real.div) that disagrees with division in this one way, and then making "/" use it. It's unclear to me if this is sensible in a general purpose programming language that isn't a proof assistant.

Re: Flix – A powerful effect-oriented programming language

#149

Very cool language. The standard library looks mostly sane, although it does have `def get(i: Int32, a: Array[a, r]): a \ r` which means that it must have some kind of runtime exception system. Not my cup of tea, but an understandable tradeoff

no, that's a region variable if i understand correctly, so closer to a rust lifetime

Re: Flix – A powerful effect-oriented programming language

#150

I'm looking forward to the day where an ml/functional inspired language can be used for real time rendering and game engines, how far are we from that? Realistically, one could argue it's not the right choice overall, but still, it's an application which would push the boundaries of what those languages have been perceived to have the greatness weakness in. An application which is mostly about handing mutable state w…

Rust exists
Post reply on HN