https://shankardevy.com/phoenix-inside-out-mpf/#mastering-ph...
I found it more approachable than the PragProg book. Helps if you've dabbled in Rails a little bit.
91–100 of 249 posts
https://shankardevy.com/phoenix-inside-out-mpf/#mastering-ph...
I found it more approachable than the PragProg book. Helps if you've dabbled in Rails a little bit.
Earlier quoted context omitted.
> When I say perfect, I mean, there has been never once in my career where I hit a roadblock due to the language's limitation or complexity or flawed assumption. I faced this with other languages, but not Elixir. This is pretty amazing praise! Are many of the other languages you've used strongly typed? That's the thing that gives me pause - I feel like I rely on the compiler a lot in languages where it can do a lot f…
Static typing is far from a panacea. Don't forget that the rise of Perl and PHP, and then later Ruby and Python was in response to statically typed languages like Java. There are trade-offs.
Earlier quoted context omitted.
> Are many of the other languages you've used strongly typed? That's the thing that gives me pause - I feel like I rely on the compiler a lot in languages where it can do a lot for me, and that I'd be really frustrated managing a large project without it. As someone who has been writing Elixir professionally for 4-ish years, and who is otherwise about as big of a proponent of static types as is possible, this is simu…
To add to this, it's worth noting that Elixir would have difficulty _ever_ becoming statically typed because of how message-passing works. For example, if you look at Gleam [0] -- the recent project that's trying to create a statically typed language for the BEAM -- it can't handle message-passing [1]. And I totally agree with you here: > I've found that it's possible to pretend it is a statically typed language if y…
Type checking unrestricted message passing would be difficult, but I can imagine a subset that's typeable.
Earlier quoted context omitted.
> When I say perfect, I mean, there has been never once in my career where I hit a roadblock due to the language's limitation or complexity or flawed assumption. I faced this with other languages, but not Elixir. This is pretty amazing praise! Are many of the other languages you've used strongly typed? That's the thing that gives me pause - I feel like I rely on the compiler a lot in languages where it can do a lot f…
Before Elixir, I considered Scala because static typing was a strict requirement for me. After I tried Elixir, I found out that good, reliable and maintainable code doesn't have to be necessarily static typed.
Earlier quoted context omitted.
> Are many of the other languages you've used strongly typed? That's the thing that gives me pause - I feel like I rely on the compiler a lot in languages where it can do a lot for me, and that I'd be really frustrated managing a large project without it. As someone who has been writing Elixir professionally for 4-ish years, and who is otherwise about as big of a proponent of static types as is possible, this is simu…
To add to this, it's worth noting that Elixir would have difficulty _ever_ becoming statically typed because of how message-passing works. For example, if you look at Gleam [0] -- the recent project that's trying to create a statically typed language for the BEAM -- it can't handle message-passing [1]. And I totally agree with you here: > I've found that it's possible to pretend it is a statically typed language if y…
We have fully type safe message passing, we just don't have any special syntax for it. I'll update the documentation to make this clearer.
What if you get disconnected due to bad network (LTE in transport). The reconnect will recover the state from the server or you loose everything ?
In a nutshell, temporary state in the client (URLs, forms) are resubmitted on reconnect. The server state is typically backed by a database.
Earlier quoted context omitted.
> When I say perfect, I mean, there has been never once in my career where I hit a roadblock due to the language's limitation or complexity or flawed assumption. I faced this with other languages, but not Elixir. This is pretty amazing praise! Are many of the other languages you've used strongly typed? That's the thing that gives me pause - I feel like I rely on the compiler a lot in languages where it can do a lot f…
Static typing is far from a panacea. Don't forget that the rise of Perl and PHP, and then later Ruby and Python was in response to statically typed languages like Java. There are trade-offs.
Question to the former Rails devs out there: We mostly see threads fawn over Elixir and Phoenix, have you experienced any downsides to switching? Anything you miss from Rails? I'm convinced to give it a try after that demo!
Also curious. I've been a django user for 5 years and a rails user for 9 years. I mostly use rails as an API these days and a React app for the front end.
To someone who uses Rails/Django with React, I'd describe LiveView as something that offers pretty much everything you're used to, but with the React part consolidated with the server-side of things.
I've been playing around with LiveView since it came out, and have been using it for 'serious' work for the past year or so, and I still regularly discover ways in which this setup simplifies things, makes development faster and more fun, and saves me from various potential security flaws or 'busiwork'.
Imagine that your store (Redux, whatever) and view (React) ran in the same place as your backend.
Direct access to the database and the rest of the backend, no need to carefully consider whether it's really worth it to increase your js payload with library x, no constant context switching, no building and maintaining of, essentially, two completely separate applications, no need to make sure your API endpoints are properly versioned, or that they don't expose data that shouldn't be exposed, or that they send only the data you need. Little to no need for rube-goldberg js pipelines, and significant less time spent dealing with synchronizing state between server and client.
I'm probably forgetting some other advantages.
There are some things where LiveView doesn't seem ideal, but I've found that even in those cases I prefer using LiveView wherever I can anyways, and then I do the specific javascripty bits wherever I need them.
How would this scale for, I don't know, 10k concurrent users? Would a live chat app be reasonable?
It runs on the same Erlang VM that Whatsapp used to scale to hundreds of millions of users on under 30 machines and very few employees.
Earlier quoted context omitted.
Static typing is far from a panacea. Don't forget that the rise of Perl and PHP, and then later Ruby and Python was in response to statically typed languages like Java. There are trade-offs.
I agree, I wasn't trying to imply otherwise. It's just that static typing is the first thing that looks like a theoretical trade-off of Elixir based on my experience, and I was curious why it doesn't feel that way in practice.