AstonJ

AstonJ

This is the Future of Webdev. Crazy, Right?

This was posted on the Elixir Forum and thought it was worth sharing here!

I love how the excitement of the author shines through and I think it does a great job highlighting the benefits of functional programming, Erlang/Elixir and Phoenix LiveView!

I’d be especially keen to hear what those of you who are using OOP languages think, and whether it’s enticed you to look at Elixir :sunglasses:

Most Liked

OvermindDL1

OvermindDL1

NaN === NaN; // -> false

This is actually correct, in any language. As per the floating point spec NaN equals nothing, not even itself. To return anything else would be failing the spec, so this is correct, not a javascript’ism (which has plenty of broken things to choose from).

As much as I want to agree with most of the article, it comes off a bit… high and mighty, and there are definitely some issues, like the fact it’s trying to go back to the ol’ RPC style calls from the long past.

And you don’t need immutability, you need either safe or no aliasing, which yes means you need immutability in most languages, but in languages like Rust you don’t, it has safe aliasing, even mutably, which means you can have both performance and safety of code where pure immutability has overhead you can’t get rid of. Pure functions are good though, to make a function impure in rust means you have to touch unsafe or something wrapping unsafe, lol, and of course without the aliasing issues then it’s safe to do as long as the unsafe code is written safe.

The Erlang VM is awesome though, especially as an orchestrational glue between parts written in native fast languages like rust. Rust can do what the Erlang VM does for its actor stuff, but it doesn’t have a great pattern for Erlang VM’s multi-node, not to say you can’t do it, just takes a lot more work.

Phoenix LiveView is just the old made new again, definitely harkens back to my Wt and N2o and such days, useful style to program pages in for server-driven code. ^.^

Phoenix channels are such a fascinating abstraction that even Rocket.rs is copying it, same names and terminology, lol.

SPA’s do still have their place however, especially if the client need to do a lot of its own calculations or little to no server communication or if it needs to run offline. It would be awesome to support both static, server side dynamic, (LiveView) and client-side dynamic (SPA) all in the same codebase though.

AstonJ

AstonJ

It’s always interesting to hear your thoughts ODL :blush:

I always think of Erlang/Elixir being the ‘brains’ of an app - basically co-ordinating everything else (like the muscle :joy:) however it’s great that you can get really far with Elixir itself (particularly with things like Phoenix and LiveView) :sunglasses:

Ah that’s interesting! A great indication that Phoenix got it right :smiley:

Rust is definitely cool - and so interesting! I can’t wait to start learning it, and I do wonder whether you should write a book about it one day!? Maybe even if it’s a Rust for Beginners or Get Started With Rust book that can be read before other books? :nerd_face:

OvermindDL1

OvermindDL1

If you ever have some time to burn I still recommend reading The Official Rust Book, lol. It’s just a bit of a crash course, the reference guide and docs are more comprehensive. of course ^.^

Where Next?

Popular Backend topics Top

New
First poster: bot
When I need to configure something in a complicated way, I find myself reviewing the embedded language that provided the server to create...
New
First poster: bot
Why Zig When There is Already C++, D, and Rust? No hidden control flow No hidden allocations First-class support for no standard library...
New
AstonJ
If you’re interested in Rust this is worth a read :smiley: Technology from the past come to save the future from itself Hi I have be...
New
First poster: bot
The run-time speed and memory usage of programs written in Rust should about the same as of programs written in C, but overall programmin...
New
First poster: bot
This post explains why Scala projects are difficult to maintain. Scala is a powerful programming language that can make certain small te...
New
CommunityNews
Have you ever wanted to write a structurally typed function in Rust? Do you spend a lot of time and effort getting your Rust struct s jus...
New
First poster: bot
Our blog has had a long standing interest in novel uses of the BEAM, or Erlang virtual machine, as shown by the many articles we have pub...
New
chikega
Mark Hoffman, the author of Programming WebAssembly in Rust, is a pretty hilarious lecturer if you like a dry sense of humor.
New
elbrujohalcon
Another week, another oldies-but-goldies post… This one about Test Driven Development.
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
PragmaticBookshelf
A PragProg Hero’s Journey with Brian P. Hogan @bphogan Have you ever worried that your only legacy will be in the form of legacy...
New
AstonJ
Or looking forward to? :nerd_face:
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New