Live data from Hacker News

Elixir v1.20: Now a gradually typed language

elixir-lang.org

111–120 of 426 posts

Re: Elixir v1.20: Now a gradually typed language

#111
post #80

Earlier quoted context omitted.

No you don't. The process is exactly the same for Java.

Nah, I work on a team that has multiple microservices written over the years in different versions of Java. "Just click the installer" is not sufficient. That's why programs like jenv, SDKman, nvm, and others even exist (and are popular). Your lack of real-world experience is showing.

LOL LaCk oF eXpErIeNcE. Bro all you have to do is open intellij and it will prompt you to install the correct version of Java.

Re: Elixir v1.20: Now a gradually typed language

#112
post #74

seems ironic that critics were saying, it needs typing, and all the elixir fans were saying you don't need typing, you don't get bugs related to typing because elixir is somehow magic, now they get typing and it finds bugs for them.... but you said you didn't need that to prevent bugs? But good to see! I spent a bunch of time trying out Elixir a while back, I enjoyed it, but just didn't agree with the lack of types.

It's the circle of life. Dynamically typed language has fans. Other people correctly say that it would be a lot more useful with static types. Fans take this personally and say it doesn't need static types because (they aren't useful anyway/it goes against the spirit of the language/it's only a scripting language anyway/you can just use a debugger/static types hurt productivity/etc. etc.) Then eventually they add sta…

For my $0.02 - it depends where you want to put the onus

Statically typed languages put the onus on the caller to transform the data into the shape(s) required.

Dynamically typed languages put the onus on the called to handle anything.

That is, in a dynamically typed environment your function has to defensively code for every possible type it could be handed.

Re: Elixir v1.20: Now a gradually typed language

#113
post #111

Earlier quoted context omitted.

Nah, I work on a team that has multiple microservices written over the years in different versions of Java. "Just click the installer" is not sufficient. That's why programs like jenv, SDKman, nvm, and others even exist (and are popular). Your lack of real-world experience is showing.

LOL LaCk oF eXpErIeNcE. Bro all you have to do is open intellij and it will prompt you to install the correct version of Java.

Don't tell OP this - he doesn't want to install multiple things. You'll scare him away from Java.

Re: Elixir v1.20: Now a gradually typed language

#114
post #63

How does it compare to Gleam? Or rather, why use Elixir over Gleam now? I suppose Phoenix and Live View in particular are big draws to Elixir.

Gleam doesn't have macros, which many Elixir libraries (such as Phoenix and Ecto) uses to great effect. Gleam for example has issues with verbosity of decoding/encoding json whereas in Rust you derive serde and in Elixir it's just a function call away. Elixir has a more mature ecosystem. While you can for example use Phoenix with Gleam (or some other Gleam framework) the experience just isn't the same. The big draw w…

> and being able to compile to JavaScript

Apparently it is not that difficult to add different compiler backends. There was a presentation [0] recently about adding wasm support as a compiler target. The implementation was quite far along, including support for the wasm component model.

[0] https://www.youtube.com/watch?v=UQ0--ODjiDk

Re: Elixir v1.20: Now a gradually typed language

#115
post #74

seems ironic that critics were saying, it needs typing, and all the elixir fans were saying you don't need typing, you don't get bugs related to typing because elixir is somehow magic, now they get typing and it finds bugs for them.... but you said you didn't need that to prevent bugs? But good to see! I spent a bunch of time trying out Elixir a while back, I enjoyed it, but just didn't agree with the lack of types.

This is the Goomba fallacy.

https://en.wiktionary.org/wiki/Goomba_fallacy

Re: Elixir v1.20: Now a gradually typed language

#116

Oooh, here we go! As a professional Elixir developer for... 10-ish years now, I've been super excited about types coming. I'm very excited that the beginnings have started to land here. That said, I would love to know how the state of what's in v1.20 compares to un-spec'ed dialyzer. I was under the impression that dyalizer's "success typing" approach (not flagging a function if there are some combination of parameter…

I'm curious what it is going to find in my 10 year old Elixir codebase (still in active production use).

Re: Elixir v1.20: Now a gradually typed language

#117

Maybe it is only my experience, but i feel that languages that were not typed since the begining never work as well as "true" typed ones.

Conversely, TypeScript is my favourite type system because it has to support the wild things people did in untyped languages.

You didn't like Purescript? It looked pretty cool to me. Its main competition back in the day was Elm, but Typescript has now taken over. From a distance Typescript seems to have too many gaps. I haven't used it though.

Re: Elixir v1.20: Now a gradually typed language

#118

Maybe it is only my experience, but i feel that languages that were not typed since the begining never work as well as "true" typed ones.

I agree with you but an alternative view, "Why are gradual static types so great?" https://www.benkuhn.net/gradual/

Re: Elixir v1.20: Now a gradually typed language

#119

Earlier quoted context omitted.

Conversely, TypeScript is my favourite type system because it has to support the wild things people did in untyped languages.

You didn't like Purescript? It looked pretty cool to me. Its main competition back in the day was Elm, but Typescript has now taken over. From a distance Typescript seems to have too many gaps. I haven't used it though.

The Lustre [0] web framework in Gleam was directly inspired by Elm.

[0] https://github.com/lustre-labs/lustre

Post reply on HN