jononomo
At my last company we migrated a large codebase from JavaScript to TypeScript – basically it just amounted to adding a couple of lines to the file, changing the extension to .ts instead of .js and then going through and making sure all your code now adhered to the slightly stricter standard. We also had a separate directory where we had some type-specification files that we had to create for some of the more complex types that we used.
Is there a similar layer that it is possible to add on top 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
The obligatory hello world thread!
Who are you and where are you from? :stuck_out_tongue:
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
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.
We’re particularly inte...
New
Is there a word for the ~> symbol used in Version strings?
Do you also just call it a Squiggle Arrow™ ?!
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
AcmeScript — Writing JS hooks as if I were still using Elixir
I’ve been having fun building a little something over the last few days: Ac...
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
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
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
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
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
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #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)
Marcus
Maybe,
@specanddialyzer. See also: How do typespecs / dialyzer compare to Typescript?jononomo
Thanks - that was an interesting thread. There seem to be mixed reviews on Dialyzer.
I’d also be curious to hear someone spell out what the upsides are to having Elixir be a dynamically typed language rather than a statically typed language.
All I hear about are the downsides of dynamic typing, but surely there must also be some upsides (other than merely slightly shorter lines of code)?
ityonemo
Upsides to dynamic typing:
Consider the case of launching Task.async within a GenServer and catching the result using the
info/2callback. How does a static typesystem correctly type this situation?LostKobrakai
There are few things, which need dynamic typing: modules defined at runtime, hot code updates, ducktyping (if if quacks it’s a duck), …
But the most important one is (distributed) message passing.
You could also look at gleam and what it can’t statically type.
dimitarvp
At this point it’s pretty much known that BEAM code cannot be 100% statically type checked. But I do wonder what’s the problem in having static checking in 95% of the places and just use more defensive dynamic dispatch code for those 5% that can’t be typed (speaking about internal implementation of course, not about manual coding in Erlang/Elixir/etc.)
LostKobrakai
Isn’t that essentially what gleam does or at least tries to do?
dimitarvp
From the (not much) of what I’ve read, yes. Still curious if they deal with macros or metaprogramming in general?
zkessin
People have been trying to add types to the BEAM since at least the 2005 timeframe, and it always seems to fail on the same few corner cases. (Dynamic Upgrades, Message passing etc)
stevensonmt
I believe the main developer of Gleam posted on here not too long ago that they do not handle macros yet in Gleam. They have an open issue on Github for discussing a macro system:
https://github.com/gleam-lang/suggestions/issues/22
al2o3cr
For a start, dynamically-typed Elixir… exists.
There are statically-typed alternatives on the horizon, but they aren’t done yet: Gleam looks to be moving forward at a good speed in public (first release of the actor stuff dropped back in October), and there’s something over at Facebook working in private.
On the flipside: what would “full” static typing bring that Dialyzer doesn’t? Even Gleam has a Dynamic type for when it can’t decide / can’t verify the type (for instance, in the raw OTP plumbing).