Live data from Hacker News

Flix – A powerful effect-oriented programming language

flix.dev

11–20 of 197 posts

Re: Flix – A powerful effect-oriented programming language

#12
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.

Arguably FP really is about eliminating side effects.

The research has sprung out of lambda calculus where a computation is defined in terms of functions (remember: Functional programming).

Side effects can only be realized by exposing them in the runtime / std-lib etc. How one does that is a value judgement, but if a term is not idempotent, then you arguably does not have a functional programming language anymore.

Re: Flix – A powerful effect-oriented programming language

#13

Earlier quoted context omitted.

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.

Arguably FP really is about eliminating side effects. The research has sprung out of lambda calculus where a computation is defined in terms of functions (remember: Functional programming). Side effects can only be realized by exposing them in the runtime / std-lib etc. How one does that is a value judgement, but if a term is not idempotent, then you arguably does not have a functional programming language anymore.

Effect systems in FP languages give you precisely that: referential transparency.

Re: Flix – A powerful effect-oriented programming language

#14
On a language semantics note: the semantics of extending/restricting polymorphic records seem to follow Leijen's approach [0] with scoped labels. That is, if you have a record e.g. r1 = { color = "yellow" }, you can extend it with r2 = { +color = "red" | r1 }, and doing r2#color will evaluate to "red"... and if you then strip the field "color" away, r3 = { -color | r2 }, then you'll get back an original record, r3#color will evaluate to "yellow". Which IMO is the sanest approach, as opposed to earlier attempts of trying to outlaw such behaviour, preferably statically (yes, people developed astonishingly high-kinded type systems to track records' labels, just to make sure that two fields with the same label couldn't be re-added to a record).

[0] https://www.cs.ioc.ee/tfp-icfp-gpce05/tfp-proc/21num.pdf

Re: Flix – A powerful effect-oriented programming language

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

[deleted]

Re: Flix – A powerful effect-oriented programming language

#17

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.

Yes… with a million weird environment variables that can affect your runtime.

Re: Flix – A powerful effect-oriented programming language

#19
post #4

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

I don't know, Kotlin, Scala and Clojure are quite successful.

I don’t think they mean the JVM makes it a non-stater in general, but a non-starter for them.

Re: Flix – A powerful effect-oriented programming language

#20

If you are in the JS ecosystem, you should check out Effect TS ( https://effect.website ) It's a very fun time

Even though it's called effect, it has almost nothing to do with algebraic effects, which is what this language and others like OCaml 5 have, and so Effect TS is more like Haskell (as it came from fp-ts).
Post reply on HN