20 ms·
I don't know about other languages but Ruby is similar in that you can name a function with any string (though you might not be able to call it in the standard
by thedanbob 1y ago
I don't know about other languages but Ruby is similar in that you can name a function with any string (though you might not be able to call it in the standard way) and the Rails default test framework takes advantage of that.
- Jtsummers 1y agohttps://tio.run/##S87JLC74/18jJTWtNE@hJiM1JydfoTy/KCelRkFDk0tBQSMtvyg3sUShREHJAyGpWKeqpKnJpYGiQfP/fwA https://tio.run/##S87JLC74/18jJTWtNE@hJiM1JydfoTy/KCelRkFDk0... Common Lisp allows it as well, though I don't think I've ever seen it done outside a demonstration that it can be done.