Earlier quoted context omitted.
Different type system with different goals. Gleam uses a modified version of the Hindley-Milner Type system. (Which is a rock solid tested type system.) A Set theoretical type system is more expressive(which suits the dynamic nature or Elixir better.) You can do Union and Intersection Types, and Negation Types, among other things, that you can't do with a HM type system. but it comes at the cost of how fast the progr…
Does Gleam check types at compile-time? And Elixir check types at run-time? (If at run-time, would that mean it would slow down your entire app as a result?)
Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
31–40 of 170 posts
Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
#32Earlier quoted context omitted.
Different type system with different goals. Gleam uses a modified version of the Hindley-Milner Type system. (Which is a rock solid tested type system.) A Set theoretical type system is more expressive(which suits the dynamic nature or Elixir better.) You can do Union and Intersection Types, and Negation Types, among other things, that you can't do with a HM type system. but it comes at the cost of how fast the progr…
Does Gleam check types at compile-time? And Elixir check types at run-time? (If at run-time, would that mean it would slow down your entire app as a result?)
Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
#33Earlier quoted context omitted.
Different type system with different goals. Gleam uses a modified version of the Hindley-Milner Type system. (Which is a rock solid tested type system.) A Set theoretical type system is more expressive(which suits the dynamic nature or Elixir better.) You can do Union and Intersection Types, and Negation Types, among other things, that you can't do with a HM type system. but it comes at the cost of how fast the progr…
Does Gleam check types at compile-time? And Elixir check types at run-time? (If at run-time, would that mean it would slow down your entire app as a result?)
There are no plans for runtime checking AFAIK
Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
#34Earlier quoted context omitted.
Doesn't gradual type system mean something else here? As in developers being able to iteratively add types while leaving untyped parts for later? At least this is how Ruby's Sorbet describes it
Correct, a gradual type system is a form of type system and not the method for rolling it out.
Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
#35Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
#36Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
#37Earlier quoted context omitted.
For more information about what that means, see this playground [0] from the TypeScript docs. PL people often make a big deal about TypeScript's lack of soundness as though it was some kind of mistake, but it was very much an intentional choice given the trade-offs they were making at the time. If Elixir can pull off soundness without compromising expressivity that will be a huge feat, and I'm excited to see it! [0]…
Yea I never bought this assertion from the TS team, saying “given the trade-offs at the time” is the same as saying “we’re already backed into a corner by previous decisions” - the decision(s) may have been intentional at each step but the design itself probably was not. Given the choice of sound or unsound, considering that the purpose of a type system is to give certain guarantees, a type system design must always…
Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
#38For 10 years I’ve been reading about cool Elixir stuff here. Love the language. I gave up on finding a job in Elixir many years ago though after seeing salaries consistently lower than more mainstream languages. It may be the language I’d want to use most, but salary and cool product are more important to me than tech stack so it may never happen. Still fun to follow from afar.
That seems surprising to me as an Elixir developer. Are you looking in the US, or elsewhere?
Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
#39For 10 years I’ve been reading about cool Elixir stuff here. Love the language. I gave up on finding a job in Elixir many years ago though after seeing salaries consistently lower than more mainstream languages. It may be the language I’d want to use most, but salary and cool product are more important to me than tech stack so it may never happen. Still fun to follow from afar.
Re: Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27
#40Does anyone know what they mean by "set-theoretic types"? I'm a PL nerd, but I've never heard this term before.
Cf. Castagna's et.al. For semantic subtyping.