News for hackers. Stuff that matters.
Re:Why Elixir? A Rebuttal to Common Misconceptions by Towaway69 on Wednesday July 23, 2025 @01:00PM (#44661411)
I prefer something like specs[1] that define a function’s signature but isn’t enforced by the compiler, instead the linter enforces them.

This is what Erlang has and it’s very convenient since once a design is fixed, I end up writing a spec to remind me what types the function expects.

[1] = https://www.erlang.org/doc/system/typespec.html

Re:Why Elixir? A Rebuttal to Common Misconceptions by conradfr on Thursday July 24, 2025 @06:17AM (#44669015)
I really don't get how having to write

  @spec foo(String.t()) :: String.t()
  def foo(bar)
is better than

  def foo(String.t() bar): String.t()