Writing code like
sort(collect(dictionary), by = x->x)
frequently I miss
CL:SECOND from Common Lisp. Were named accessors of this kind considered? Or is there a standard way to automagically make a closure of field names, eg something equivalent to
"Accessor function for a field name." macro fa(fieldname) :(x->x.$fieldname) end sort(collect(dictionary), by = @fa second)
PS.: Of course I know that
second and there would be a conflict.