|
|
|
|
|
by devmunchies
617 days ago
|
|
One thing I dislike with erlang based languages (both gleam and elixir) is that they use “<>” for string concatenation. In F#, “<>” is the equivalent of “!=“. Postgres also uses <> for inequality so my queries and f# code have that consistency. |
|
Erlang and Elixir don't overload the `+` operator. In fact, they don't overload ANY operators. If you can forgive the syntactic choice of the operator itself (which I think it pretty fair considering Erlang predates Postgres by a decade and F# by two decades), this allows them to be dynamic while maintaining a pretty high level of runtime type safety. For example, one of the "subtle bugs" people refer to when criticizing dynamic languages (even strongly typed dynamic languages) is the following would work when both args are given strings or numbers:
Erlang/Elixir eliminate this particular subtle bug (and it goes beyond strings and numbers) since: will only work on numbers and raise if given strings.