註冊並分享邀請連結,可獲得影片播放與邀請獎勵。

Ryan Lopopolo
@_lopopolo
Principal Engineer, Agentic GCP @googlecloud • prev @OpenAI • Building the future of work. Harness engineering. As an agent influencer, • opinions mine
加入 January 2022
1.2K 正在關注    10.8K 粉絲
TIL [4.0.9] > predicate = Kernel.instance_method(:nil?) => #nil#?()> [4.0.9] > predicate.bind_call(nil) => false There are two defs for nil? in Ruby. The one in Kernel is hard coded to return false, and one on NilClass hard coded to return true. Remarkably elegant! It removes one form of branching by exploiting method dispatch.
顯示更多