(no title)
devmunchies | 1 year ago
In F#, “<>” is the equivalent of “!=“. Postgres also uses <> for inequality so my queries and f# code have that consistency.
devmunchies | 1 year ago
In F#, “<>” is the equivalent of “!=“. Postgres also uses <> for inequality so my queries and f# code have that consistency.
sodapopcan|1 year ago
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.devmunchies|1 year ago
Interesting table here highlighting old programming languages https://en.wikipedia.org/wiki/Relational_operator#Standard_r...
mixmastamyk|1 year ago
Shouldn’t copy Erlang, otherwise might as well use it.
IshKebab|1 year ago
The solution to type confusion is not separate operators for every type, it's static types!
greydius|1 year ago
Jtsummers|1 year ago
Erlang doesn't use <> for concatenation so it's odd to name it in this comment, like that language and its developers have anything to do with your complaint. If it upsets you so much, lay it at the feet of the actual groups that chose <> for concatenation instead.
devmunchies|1 year ago
throwawaymaths|1 year ago
mixmastamyk|1 year ago
riffraff|1 year ago
https://docs.perl6.org/language/operators#Hyper_operators
amelius|1 year ago
Also, <> was != in BASIC, I believe.
PS: Don't paste this comment in your shell.
trenchgun|1 year ago
Elixir uses <> as an operator for concatenation of binaries, (which does form a monoid of course), not to be confused with how Haskell uses <> as a binary operator of a Monoid, but for sure inspired by it. And Gleam picked it up from them, probably, to use for a special case of a list monoid, String. And Haskell created <> for Monoid, because it would be too confusing to use multiplication sign for the binary operation like mathematicians do. It would not be ok in programming context.
gorgoiler|1 year ago