tcoopman
I discovered this link on bluesky, and it was a bit of an accidental thing, but I think it contains some nice information that’s worth checking out if you’re interested in the type checking future of Elixir.
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
I’m posting this in response to Jose’s recent tweet (Cr. link) :
People are sleeping on Elixir for a coding harness:
Hot-code swappi...
New
Hello,
I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes.
We’re a small ...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Eiji
@tcoopman Keep in mind that changes even in nearest
Elixirversion would not affect whole community immediately. There would be months if not years of delay. That’s because many projects supports fewElixirversions back, so at best they may have both systems implemented (assuming the new one would not cause compilation errors in earlier versions) and in worst case they would replace new system after a longer time.If said change would happen in
ecto,phoenix,credo,excoverallsand many, many other most popular packages then the change to new type system would be rapid as there would be no sense to maintain both systems in long term especially if they are completely different while covering same things.That’s said … new projects or those who focused on support latest
Elixirversions would most likely switch to new system immediately as long as@type,@typepand@opaquewould not be hard deprecated (if any). Unlike in packages shared onhexthose projects would not cause problems with other projects and if they do (umbrella apps, internal dependencies) then most likely all related projects would have such changes soon as well.However it would progress I would take a deep look from the very beginning as I wrote tons of typespecs and I’m willing to migrate asap (even if it would be 100% manual). I only wonder if
Elixircore team plans to work in future oncoverreplacement. Similarly todialyzercoverage does not works as good as it could (especially with macros) and modules with only types and struct definitions that have0relevant lines which is equal to0%coverage!jswny
One thing I don’t understand from Jose’s comment is this:
Does that mean there will be no type inference or checking within the same project?
cevado
it actually says in the part you quote
type check will be done whenever you do the annotations, inference only for external stuff.
cevado
i think the semantics for
@type@typepand@opaquewill never go away once its used for docs, even in erlang ecosystem… deprecation of those things seems to be a big departure of the tools of the ecosystem, i’d think it would happen on a possible elixir 2.0 at some point.jswny
Right but that means you can’t do much type checking if there are no explicit type annotations in the project code right?
Maybe I’m misunderstanding, but it seems like the following would happen:
In this example, the compiler would throw a compilation error on
bazbut not onbarbecause the type offoois not being inferred therefore it doesn’t know thatfoo(123)is not validtcoopman
Type inference will work inside a module, not across modules. If I understand correctly, you can read more about it here: elixir/lib/elixir/pages/references/gradual-set-theoretic-types.md at main · elixir-lang/elixir · GitHub
tcoopman
I tried to search for an issue for this on github, but couldn’t find any immediately. Did you report this problem?
Eiji
Except that I checked it on a project I currently work on, I wrote this from memory … I have read about it years ago and obviously don’t remember the source.
tcoopman
If you have a real issue, I’d say open a bug report. That’s the way issues get fixed
josevalim
If you don’t have a type signature, we will infer one for you and use it when type checking remote calls. The inferred signature can understand everything about your code, except calls to other modules in the same project. So they are a good approximation and give valuable benefit for whoever wants to be lazy and not type anything. If you want proper type checking, then you have to write the signatures for your public functions.