Live data from Hacker News

Flix – A powerful effect-oriented programming language

flix.dev

191–197 of 197 posts

Re: Flix – A powerful effect-oriented programming language

#191

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

Graal Native Image and you have your native binary.

Never used graalvm. Does it produce a machine code, or is it packaging the entire JVM in a zip like file?

Re: Flix – A powerful effect-oriented programming language

#192
post #164
post #159

Earlier quoted context omitted.

Just looking at the language myself, but it seems that it treats out-of-bounds array access as a non-recoverable bug and panics [1, 2], whilst map access returns Option [3]. Exceptions are a language construct only to enable Java compatibility and not recommended otherwise [4], but that's not to say you couldn't implement your own try/catch using the effect system. `r` is a region variable as the sibling comment says…

I agree with OP that this seems a little unfortunate, even though it's pretty par for the course. "Bugs are not recoverable errors" is such a fuzzy idea. On the one hand, indexing an array with an out-of-bounds integer could just be considered a program bug. On the other, the point of making the indexing operation return an optional value is to force the program to handle that scenario, preventing it from being a bug…

It does seem to depend highly on the context in which the array is used. Strictly defined algorithm with an off-by-one: bug. User-defined indexing as you say is a counter. I suppose it is hinging on arrays being used in less dynamic contexts where you're likely to know the length, so to save you from handling all the Nones. I think I'd prefer a parallel api that returns Option, so you don't need to duplicate the bounds checking.

Re: Flix – A powerful effect-oriented programming language

#193
The first example[1] has a classic look-before-you-leap stupidity. That's not a great look!

  match File.exists(f) {
  ...

  match File.stat(f) {
The file can be removed after the first call, before the second. Just call stat and handle ENOENT correctly.

[1]: The page seems to randomize which one is shown. I got the "File information" one in the dropdown.

Re: Flix – A powerful effect-oriented programming language

#194

love the syntax, and excited to mess with it, but man i’m sad to see it’s on the JVM. if i had to guess, a lot of langs like this are on JVM because that’s a lot simpler than writing a whole backend with anywhere near the same performance or reliability, and i totally get that. that being said, bearing in mind that i’m not a Java/JVM developer and only rarely have to use it, for the few nontrivial projects i have shi…

there's no such thing as generic "jvm builds" as far as i understand though. jvm is the target, it's like saying x64 builds are complex. maybe you re thinking of ant or maven or gradle? there are plenty others. you can build basic java with "javac myfile.java". done. each jvm language has its own build tools and some build tools cover jvm languages in between others.

i think you’re right, though i think i was thinking about about this at a higher level. i more meant that the languages in the JVM ecosystem I have experience with (java, kotlin, and scala) have all given me similar unpleasant experiences building them. same tools too, though you probably wouldn’t use sbt for non-scala projects even though you could.

the main pain points for me are dependencies, packaging, and configuration. best i can tell, those pains are shared between anything that targets JVM, especially those that want to have good interop.

Re: Flix – A powerful effect-oriented programming language

#195

Earlier quoted context omitted.

the silly insane pythonic whitespace significance and lack of formatter drove me nuts. LSP didnt work half the time. Loved the idea, will visit again, but it resisted me expressing my program. If they get rid of the whitespace malarkey (why do i have to say it it!?) and the dev tools spruce up, im all in baby

Flix does not have significant whitespace. Where did you run into trouble? You are welcome to swing by Gitter if you need help. We are friendly :-)

Flix looks great! I was speaking to the unison quirks.
Post reply on HN