3 ms·
I'm impressed that these characters can be used in code: Σ₁,Σ₀, σ²
by tomrod 13y ago
I'm impressed that these characters can be used in code:
Σ₁,Σ₀, σ²
- Derbasti 13y agoMany moder programming languages allow arbitrary unicode symbols as variable names. I am now thinking about doing this in Python.
- tomrod 13y agoFair enough. I use Sublime and write in python on Ubuntu. How might I go about incorporating Unicode?
- Derbasti 13y agoHmm, here's a thought: Instead of naming a function "sum", call it Σ, and similarly use √ instead of "sqrt". This would enable you to write things like rms = √(1/len(x)*Σ(x)) Which is really quite cool from a mathematical view point.
- Gravityloss 13y agoMight be nice to read, but I wouldn't want to edit code written like that, since the symbols could well be harder and slower to write on a normal keyboard / editor.