Interview with Robert Virding, Creator of Lisp Flavored Erlang
medium.com
medium.com
For those who might have missed it, there is also an accompanying book that is a work in progress of converting the MIT classic "Structure and Interpretation of Computer Programs" to Lisp Flavored Erlang here: https://lfe.gitbooks.io/sicp/content/index.html
someone is relatively new to HN ;).
split(List, N) when is_integer(N), N >= 0, is_list(List) ->
split(N, List);
split(N, List) when is_integer(N), N >= 0, is_list(List) ->
case split(N, List, []) of
{_, _} = Result -> Result;
Fault when is_atom(Fault) ->
erlang:error(Fault, [N,List])
end;
split(N, List) ->
erlang:error(badarg, [N,List]).
It makes the ordering inconsequential in this case... which I can see as a sort of transient bad thing.You could also straight up migrate the API and provide a set of compatibility_mode parse transformations to be included which would take old-signature invocations and replace them at compile-time with the new ones, forcing really only a build-phase change to existing code bases until they make the change on their own.
I dunno. It's been an annoying problem for a long time and a common complaint amongst newbie Erlang developers, but I guess at the end of the day you just get used to it, so as you get more experienced you probably just care less about it. That said I'd love to see better adoption of Erlang, and "simple" things like this might assist with that.
Lower barrier of entry to the stages of scaffold-project -> write -> build -> test cycles is one of the things that's really appealing about Elixir by comparison.
Is this kind of thing of any interest at all to Ericsson to accept upstream if the community were to go through the drudgery of combing the stdlib for the places these changes should be made and providing options for transition/deprecation paths?
Additionally, these changes are largely superficial, not functional. They're in the "make it pretty" part of the "first make it work, then make it pretty, then make it fast" ethos.
It's purely developer experience focused of course. The machine doesn't care what order the arguments are in. Well that may not be entirely true. I'd have to look more closely at the function-head matching implementation to see if there's some benefit or hinderance in putting non-scalar types first in the argument list... but that would be in the "make it fast" part that comes later ;-)
https://github.com/oubiwann/los/blob/master/examples/no-macr...
http://busfactor1.ca/bin/eturia/lib/sigil/the-order-of-symbo...
Feedback appreciated.