The Case for Stabby Lambda Notation
12-Dec-2019 1887
In a previous article, "lambdas Are Better Than procs", I proposed that lambdas should be used rather than procs in almost all cases, given that they are safer in terms of argument count checking and return behavior.So it makes sense that -> should create a lambda and not a proc. (As an aside, it always puzzles me when people use the term stabby proc, when it creates a lambda.)One way to look at it is, by using the stabby lambda notation, we aresaying "make me Ruby's implementation of an objectless function". This is at a level higher than "make me a lambda" or "make me a proc", and is probably a better interface to the programmer, especially the newer Rubyist.
The Case for Stabby Lambda Notation #ruby #rubydeveloper #rubyonrails #Stabby #Lambda #Notation https://www.rubyonrails.ba/link/the-case-for-stabby-lambda-notation