3 ms·
Just FYI why i lold at this beeing a fitting example: File.read("in.txt").split("\n").sort.map(&:trim).uniq No need for X temporary variables and N lines of
by herbst 10y ago
Just FYI why i lold at this beeing a fitting example:
File.read("in.txt").split("\n").sort.map(&:trim).uniq
No need for X temporary variables and N lines of code in ruby.
Also notice the better readability as everything happens from left to right?
- imaginenore 10y agoIndeed, Ruby is a beautiful language, but so ridiculously slow.
- herbst 10y agoWhile i would say thats a non issue in webdevelopment and scripting, i agree that compared to others its just slow