Earlier 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…
Flix – A powerful effect-oriented programming language
81–90 of 197 posts
Re: Flix – A powerful effect-oriented programming language
#82Tangential, 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…
Re: Flix – A powerful effect-oriented programming language
#83I looked and Flix a while ago and found it really interesting - so much so that I wrote an article "Flix for Java Programmers" about it. Might actually be a bit outdated by now.. need to look at Flix's recent development again. But if you're interested: https://www.reactivesystems.eu/2022/06/24/flix-for-java-prog...
Re: Flix – A powerful effect-oriented programming language
#84Probably Elixir spoiled me but when I see enum Shape { case Circle(Int32), case Square(Int32), case Rectangle(Int32, Int32) } def area(s: Shape): Int32 = match s { case Circle(r) => 3 * (r * r) case Square(w) => w * w case Rectangle(h, w) => h * w } I wonder why not this syntax: def area(s: Shape.Circle(r)) = { 3 * (r * r) } def area(s: Share.Square(w)) = { w * w } def area(s: Shape.Rectangle(h, w)) = { h * w } area(…
> The Int32 or Int32, Int32 types are in the definition of Shape, so we can be DRY and spare us the chances to mismatch the types I have to admit I don't see the distinction here in terms of DRYness--they are basically equivalent--or why the latter would somehow lead to mismatching the types--presumably if Flix has a typechecker this would be a non-issue. I use Elixir now at work and I have used Haskell and PureScrip…
enum Shape {
case Circle(Int32),
def area(s: Shape): In32 = match s {
Not only I had to write something that the compiler already knows, but I typed a compilation error. The second type definition is there only to make developers write it wrong. It does not add any information.Re: Flix – A powerful effect-oriented programming language
#85Earlier quoted context omitted.
> The Int32 or Int32, Int32 types are in the definition of Shape, so we can be DRY and spare us the chances to mismatch the types I have to admit I don't see the distinction here in terms of DRYness--they are basically equivalent--or why the latter would somehow lead to mismatching the types--presumably if Flix has a typechecker this would be a non-issue. I use Elixir now at work and I have used Haskell and PureScrip…
Because I might write enum Shape { case Circle(Int32), def area(s: Shape): In32 = match s { Not only I had to write something that the compiler already knows, but I typed a compilation error. The second type definition is there only to make developers write it wrong. It does not add any information.
Re: Flix – A powerful effect-oriented programming language
#86Re: Flix – A powerful effect-oriented programming language
#87Earlier quoted context omitted.
> The Int32 or Int32, Int32 types are in the definition of Shape, so we can be DRY and spare us the chances to mismatch the types I have to admit I don't see the distinction here in terms of DRYness--they are basically equivalent--or why the latter would somehow lead to mismatching the types--presumably if Flix has a typechecker this would be a non-issue. I use Elixir now at work and I have used Haskell and PureScrip…
Because I might write enum Shape { case Circle(Int32), def area(s: Shape): In32 = match s { Not only I had to write something that the compiler already knows, but I typed a compilation error. The second type definition is there only to make developers write it wrong. It does not add any information.
Int32 is the type of the return value for the function (https://doc.flix.dev/functions.html), which is distinct information not implied by the type being passed in (Shape), so I dispute this characterization--the fact that this type is the same type as the parameter given to all of Shape's terms is specific to this example. Furthermore I suspect it would immediately be caught by the typechecker regardless.
While in a language like Haskell you could define this function without a type definition and its type would be inferred (vs. in Flix, see https://doc.flix.dev/functions.html?highlight=inference#func...), regardless I will almost always declare the type of top-level functions (or even non-top-level functions) for clarity when reading the code. I think this is useful and important information in any case.
Re: Flix – A powerful effect-oriented programming language
#88Earlier quoted context omitted.
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.
What’s the best way to stay informed about the typescript version?
Re: Flix – A powerful effect-oriented programming language
#89I 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…
Indeed. I even like the syntax.
Re: Flix – A powerful effect-oriented programming language
#90Tangential, 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? :)
In general, programming language theory is pretty strong in Denmark, with lots of other contributions.
For example, the standard graduate textbook in static program analysis (Nielson & Nielson) is also Danish. Mads Tofte made lots of contributions to Standard ML, etc.
> They aren't your 'typical' Ivy League/Oxbridge univ+techhubs.
Aarhus is an outstanding university. There are a couple of dozen universities in Europe that lack the prestige of Oxbridge but offer high quality education and perform excellent research.