Comment by butterNaN
21 hours ago
That is categorically not "how things are done" in the Elixir world. Have you considered that the Advanced Next Token Predictor may be imperfect?
21 hours ago
That is categorically not "how things are done" in the Elixir world. Have you considered that the Advanced Next Token Predictor may be imperfect?
It kind of is though, regardless of what the LLM did there, the 'happy path' with something like Phoenix is using the phx.new and the generators which gives you a ton of files and structure that is a bit overwhelming for people used to more 'minimalist' web frameworks.
Check this out this guide from the Phoenix docs:
https://hexdocs.pm/phoenix/json_and_apis.html
That's a ton of stuff just to return some JSON from an endpoint. Sure the structure probably helps when you get into big complex projects, but for a beginner not used to this style of framework it looks like a lot.
Isn't Phoenix more like Django (rather than Flask) which would also generate multiple files?
Yes, and the same point should apply to Django from Flask. I think the point being made is that it's not immediately obvious that Elixir does have a microframework in Plug and that is a fair assessment. Just from my own observations this is because there is very little interest in such a thing (it's not zero, but it's low). Most of us have realized that using micro-frameworks leads you to inventing Phoenix/Django/Rails anyway so why not start there? Phoenix especially is pretty lightweight, even with "all those files." I think making Plug more prominent even in the Phoenix docs wouldn't be a terrible idea.
Elixir is to Phoenix as Ruby is to Rails. The original comment was about Elixir, not Phoenix.
It also explicitly mentions Flask, which would be inane to directly compare to either Phoenix or Rails. How complex is your Django app, Mr. Python?
Your comment comes across a bit hostile.
Regardless, I believe "something like Phoenix is using the phx.new and the generators which gives you a ton of files and structure that is a bit overwhelming " is true, it can be overwhelming, when the same thing in, say, Go, would be only one file.
Ok sure, but Phoenix is the go-to solution for web projects in Elixir, especially newcomers are frequently told to just use Phoenix instead of trying to build on Plug.
The feedback from the Python person was a bit harsh, and evaluating a language based on LLM generated code is of course silly, but I think some of it still holds true. I'd love for Elixir to be a more approachable solution for simple web services.