>> 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 eff…
Flix – A powerful effect-oriented programming language
71–80 of 197 posts
Re: Flix – A powerful effect-oriented programming language
#72I am deeply impressed by the depth and breadth of this language. Algebraic data types, logic programming, mutability, all there from the get go. Another aspect that I love from their comparison table is that a single executable is both the package manager, LSP and the compiler. As I understand, the language server for Haskell has/had to do a lot of dances and re implement things from ghc as a dance between the partic…
> AFAIK, types are erased by JVM compilers... Not in all the cases (it keeps type parameters for anonymous classes) and there are various workarounds. Also, essentially, it's not a problem at all for a compiler, you are free to render applied type constructors as regular classes with mangled names.
Caveat: Flix sometimes has to box values on the boundary between Flix and Java code -- e.g. when calling a Java library methods that requires a java.lang.Object due to erasure in Java.
Re: Flix – A powerful effect-oriented programming language
#73JVM is a no-starter. The language looks nice tho, shame they built it on JVM.
Re: Flix – A powerful effect-oriented programming language
#74// Computes the delivery date for each component. let r = query p select (c, d) from ReadyDate(c; d) facepalm . Select should always come last, not first, haven't we learned anything from the problems of SQL? LINQ got this right, so it should look like: query p from ReadyDate(c; d) select (c, d) Very cool language otherwise.
It is a fair point-- the implicit argument being that this allows `c` and `d` to be bound before they are used, and hence auto-complete can assist in the `select` clause. Nevertheless, the counter argument is that the form of a logic rule is: Path(x, z) :- Path(x, y), Edge(y, z). i.e. an implication from right to left. This structure matches: query p select (x, z) from Path(x, y), Edge(y, z). So the trilemma is: A. K…
1. I think way more people coming to your language will be familiar with SQL and it's problems than with logic programming and Horn clauses.
2. I think many people are now familiar with functional pipelines, where filters and transforms can be applied in stages, thanks to the rise of functional programming in things like LINQ and Java's Stream API. This sort of pipelining maps naturally to queries, as LINQ has shown, and even to logic programming, as µKanren has shown.
3. People don't type programs right-to-left but left-to-right. To the extent that right-to-left expressions interfere with assisting the human that's typing in various ways (like autocomplete), I would personally defer to helping the human as much as possible over historical precedent.
4. Keeping the logic fragment separate from the query fragment (option C) seems viable if you really, really want to maintain that historical precedent for some reason.
My two cents. Kudos on the neat language!
Re: Flix – A powerful effect-oriented programming language
#75>> 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
#76Anyone have a good primer on what effect-oriented programming looks like and how it’s used? Feel free to shill your own blog!
Shilling my book "Effect Oriented Programming" https://effectorientedprogramming.com/ The book uses Scala & ZIO but intends to be more about the concepts of Effects than the actual implementation. I'd love to do a Flix version of the book at some point. But first we are working on the TypeScript Effect version.
Re: Flix – A powerful effect-oriented programming language
#77Anyone have a good primer on what effect-oriented programming looks like and how it’s used? Feel free to shill your own blog!
Shilling my book "Effect Oriented Programming" https://effectorientedprogramming.com/ The book uses Scala & ZIO but intends to be more about the concepts of Effects than the actual implementation. I'd love to do a Flix version of the book at some point. But first we are working on the TypeScript Effect version.
Re: Flix – A powerful effect-oriented programming language
#78Re: Flix – A powerful effect-oriented programming language
#79Earlier quoted context omitted.
I think the problem is that it targets a VM instead of native machine architectures, not the quality of the VM. I also find the times I need to target a VM to be very limited as I'm generally writing code for a specific platform, not a cross platform application. Of course this will vary between developers.
Targeting JVM means not having to roll your own garbage collector. And bonus, you get a huge world of third party libraries you can work with. It's been over a decade since I worked on the JVM, and Java is not my favourite language, but I don't get some people's hate on this topic. It strikes me as immature and "vibe" based rather than founded in genuine analysis around engineering needs. The JVM gets you a JIT and G…
Re: Flix – A powerful effect-oriented programming language
#80Tangential, but I have a basic question: What makes Aarhus (mainly its university/techhub) a powerhouse for Programming Languages? C++, C#/Typescript, Dart, etc all have strong roots in that one small area in Denmark. In general, I am curious what makes some of these places very special (Delft, INRIA, etc)? They aren't your 'typical' Ivy League/Oxbridge univ+techhubs. Is it the water? Or something else? :)
Lineage? Aarhus has a strong academic tradition in areas like logic, type theory, functional programming, and object oriented languages. Many influential researchers in these fields have come through there. I also think there's a noticeable bias toward the US in how programming language research is perceived globally. Institutions like Aarhus often don't invest heavily in marketing or self-promotion, they just focus…