Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    λ->planck(λ*nm,T=T)*m^3/Watt*cie_color_match(λ)
This syntax made me cringe hard. Kids these days…


Is this so unreasonable? I needed to curry the function to sweep over the temperature T. And if you take out the units, it's simply pointwise multiplication of two functions.


Yes and no. The syntax x -> f(x) is borrowed from functional programming, which borrows it from λ-calculus. In λ-calculus, λx. f(x) is the function which maps x to f(x). So, λ -> f(λ) makes me cringe hard, because λ is a keyword! It's like trying to write in Python:

    def def(x):
        pass
Weird, uh?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: