← Back to context

Comment by johnisgood

18 hours ago

My only issue when it comes to Erlang and Elixir (or Java and Kotlin) is that there are just so many files I need to open and keep track of. I do not blame the languages, of course, but it is the reason for why I use Go for less serious projects instead of Erlang / Elixir, because in Go it would typically be contained in one file, whereas in Elixir it would span across multiple files.

You gotta be trolling...

You're literally responding to someone pointing out you don't need multiple files in elixir.

And the same is true for Java and kotlin. Heck even the official spring boots demo videos define everything in a single file nowadays.

Multiple files is just a convention, because otherwise your project will become unhandy eventually. That applies to Go as well.

  • I am talking about the typical / usual case. In fact, you typically use "mix phx.new" for projects using Phoenix in Elixir, and it creates lots of files, as opposed to "import ..." in a single Go file. I never said that it is impossible to do in Elixir (or Java), but it is not the typical case.

    • Are you comparing Elixir with a framework as extensive as Phoenix to Go and "just" its standard http library? If so I'm not sure that would be a good comparison then.

      1 reply →

    • That's the typical use case if you want a web server. If you're writing for low-level devices, you'd use `mix nerves.new project_name`. If you're writing an Elixir app that won't be a web server, you'd use `mix new project_name`. If you're writing an elixir script, you'd use `touch script_name.exs`

      8 replies →