Curious if anyone can weigh in on why Flix requires a developer to explicitly mark a function as pure. I'd imagine in almost all cases this can be derived through static analysis.
Flix – A powerful effect-oriented programming language
131–140 of 197 posts
Re: Flix – A powerful effect-oriented programming language
#132Re: Flix – A powerful effect-oriented programming language
#133Some gems:
---
Q: Wait, division by zero is zero, really?
A: Yes. But focusing on this is a bit like focusing on the color of the seats in a spacecraft.
---
Q: "This site requires JavaScript"
A: People who have criticized the website for using JavaScript: [1], [2], [3], [4], [5].
People who have offered to help refactor the site to use static html: 0.
---
Q: I was disappointed to learn that Flix has feature X instead of my favorite feature Y.
A: We are deeply sorry to have let you down.
---
Q: This is – by far – the worst syntax I have ever seen in a functional language. Semicolons, braces, symbolic soup, et al. It is like if Scala, Java and Haskell had a one night stand in the center of Chernobyl.
A: Quite an achievement, wouldn't you say?
Re: Flix – A powerful effect-oriented programming language
#134Curious if anyone can weigh in on why Flix requires a developer to explicitly mark a function as pure. I'd imagine in almost all cases this can be derived through static analysis.
Re: Flix – A powerful effect-oriented programming language
#135Re: Flix – A powerful effect-oriented programming language
#136I 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?
Re: Flix – A powerful effect-oriented programming language
#137Earlier quoted context omitted.
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…
Our long winters + free education sure doesn't hurt either - what better way to spend the yearly 6 months of darkness than working on a new proglang?
Also, long winters? You're thinking about Canada. The daily mean temperature in Aarhus, Denmark in January (the coldest month) is 1.3 C (34.3 F). https://en.wikipedia.org/wiki/Aarhus#Climate.
By comparison, Montreal, Canada has a daily mean temperature in January of -9.2 C (15.4 F).
Re: Flix – A powerful effect-oriented programming language
#138Earlier 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…
Re: Flix – A powerful effect-oriented programming language
#139Earlier quoted context omitted.
The reality is that careless programmers will do bad things with any tool they happen to pick up. Using that as an excuse to reduce the power of a tool is poor form. Another way of putting it is to point out that removing goto from a language isn't going to reduce the occurrence of spaghetti code. The average skill and care of the developers who happen to be using that language is what does that.
Not sure I agree. A simple example: If your language has null as a subtype of every type then you will have null ptr exceptions everywhere. If your language does not have a null value then you won't. The situation is not as clear cut as you suggest. Yes, you can write spaghetti code in any language. But a good language design can help (a) reduce errors and (b) nudge the developer towards writing better code.
I primarily write JVM applications these days, and my go-to is Kotlin.
Not because I think it's the "best" JVM language -- quite the opposite, I think Scala 3 is potentially the best-designed pragmatically useable language at the moment.
But Scala 3 gives you "too much rope to hang yourself with".
If you're the only person touching a codebase that's fine, but if you have to work with others I don't want to introduce the possibility of a bunch of implicit type classes, macros, and insane type definitions.
I'll take the reduced expressiveness of Kotlin for it's working-class philosophy and simpler mental model.
Re: Flix – A powerful effect-oriented programming language
#140Earlier quoted context omitted.
I have the opposite gut feeling about LLM's; I think they're going to break down the barriers to adopting new programming languages, since they'll lower the cost of porting code dramatically. The code in a language's standard library is probably enough to train an LLM on the new syntax, and even if it isn't, agents now observe the compiler output and can in principle learn from it. Porting code from one language to a…
I hope so! On one hand I worry about the training corpus being so overwhelmingly biased toward certain languages that everything else will be drowned out. On the other, I think there'll be a point where we realize "reasoning" LLMs are more proficient with the same tools that we are: sound type systems, reusable libraries, concise syntax, DSLs where they make sense, etc. that the end game will look much more like skil…
With how increasingly automated my code authorship is, reliability and training data matter a LOT.