Comment by johnisgood
2 months ago
I do have experience with Elixir though, I am not sure where you have gotten your conclusions from. What do you think are my claims? I know it is possible to do everything in a single file, but that is NOT the typical case, and you know it. Additionally, I really did not consider myself arguing.
I prefer fewer files, usually, especially when I am just trying to show something up as soon as possible. I do not mind having a serious project written in Elixir (which I have) that spans across multiple files, though.
At any rate, what am I wrong about? I expressed my preference. When I want to get things done ASAP, I stick to Go these days (one file). If I know it is going to be a serious project, I stick to Elixir (multiple files). There is not much to it really. I apologize if I came across as argumentative.
I thought you claimed that you just asked AI and you mistakenly thought elixir requires a lot of files (something that is 100% false). How many years jave you been an elixir developer if you claim to have experience?
I did not ask AI about this (not sure where you got this from, it was probably someone else), nor have I thought that Elixir technically requires a lot of files, but typically you do have more files, just like in Erlang, which is why I said I use Go for less serious projects. Challenge: find me any serious projects in Erlang or Elixir that consists of less than 4-6 files. And I mean, we are talking about web frameworks, so, "mix phx.new" alone creates a lot of files (100% true, even with specific CLI flags).
If you have experience with these languages yourself, then you know that separation of concerns is a core principle. Elixir (and Erlang) projects, especially those built with Phoenix or OTP principles involve a multitude of files, even for relatively small applications. This is not because the languages require them per se, but rather because the conventions and idioms of both languages, especially within the OTP framework encourage modular, isolated units of behavior spread across separate files, which I do not think is a bad thing in itself.
> If you are just doing a script in Elixir it is just one file.
I know! I already left a comment agreeing with someone else saying that, which I have known already anyways.
Again, I was voicing my frustration with keeping track of a lot of files, which is not what I want to do in the case of not-too-serious projects, which is why I use Go for less serious projects, as I have previously mentioned. I do not always mind having a lot of files, but there are cases when I do, just like how one may not prototype in a low-level language as opposed to a high-level one.
In any case, I hope I could clarify well enough for you. Do we still disagree?