Is using the word optics for other things than projecting light with glass a new thing? I do not recall seeing this word used for other purposes much say 10-15 years ago. Not a native English speaker but have read English for at least 30 years.
https://research.utwente.nl/en/publications/functional-progr...
In particular, the metaphor isn't used in Algorithmics: Towards Programming as a Mathematical Activity (1986).