News for hackers. Stuff that matters.
Re:Elixir at Ramp by pmontra on Friday June 04, 2021 @09:42AM (#27393507)
The missing return statement has never been a big deal in my experience. In part it's absorbed by pattern matching (multiple definitions for the same function) and in part by "let it fail."

Tracebacks are not so bad but they tend to be useless when the cause of an error is in a different process than the one that failed. I know that my GenServer failed at line x with data y, z but I don't know what sent that x to the GenServer. I have no idea if there is a way around this except extensive logging.

Re:Elixir at Ramp by dnautics on Friday June 04, 2021 @09:58AM (#27393645)
> I know that my GenServer failed at line x with data y, z but I don't know what sent that x to the GenServer. I have no idea if there is a way around this except extensive logging.

Ah, you were using casts instead of calls. Use calls as much as possible, even if you always send back :ok. This needs to be documented as part of best practices.

Re:Elixir at Ramp by strokirk on Friday June 04, 2021 @05:48PM (#27399462)
IMO pattern matching often makes the code harder to read, especially with deep destructuring spanning multiple lines. Could be our codebase, but writing code prolog-style has always made it neigh-unreadable to me.