Live data from Hacker News

Flix – A powerful effect-oriented programming language

flix.dev

1–10 of 197 posts

Re: Flix – A powerful effect-oriented programming language

#5
post #2

I'd love to use Flix for something. It looks beautiful. But I'm a web dev, and never touch the JVM ecosystem

Oh, but you can just transpile it to WASM using e.g. TeaVM [0]. Just add another build step to your bundler or whatever web dev uses nowadays to build apps.

[0] https://github.com/konsoletyper/teavm

Re: Flix – A powerful effect-oriented programming language

#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?

Re: Flix – A powerful effect-oriented programming language

#7

JVM is a no-starter. The language looks nice tho, shame they built it on JVM.

The JVM is a state-of-the-art virtual machine with multiple open source implementations, a large ecosystem, and a fast JIT compiler that runs on most platforms. It is hard to find another VM with the same feature set and robust tooling.

Re: Flix – A powerful effect-oriented programming language

#8
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?

FP isn't really about eliminating side effects. Controlled effects are fine. That's what an effect system does.

Avoiding side effects is really just a side effect (pun intended) of older programming language technology that didn't provide any other way to control effects.

Re: Flix – A powerful effect-oriented programming language

#9
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?

In Flix all effects are tracked by the type and effect system. Hence programmers can know when a function is pure or impure. Moreover, pure functions can be implemented internally using mutation and imperative programming. For example, in Flix, one can express a sort function that is guaranteed to be pure when seen from the outside, but internally uses a quick sort (which sorts in place on an array). The type and effect system ensures that such mutable memory does not escape its lexical scope, hence such a sort function remains observationally pure as seen from the outside.

(I am one of the developers of Flix)

Post reply on HN