Hacker News new | past | comments | ask | show | jobs | submit login

That's not really a solution, is it, for example I don't want <= to be confused with ≤ within a string. What you propose is just one more half-baked solution that the industry is full of.





That's why you need editor support for this; the lexer understands the difference between an operator and a string literal (that's how syntax highlighting works), and should be able to use ligatures in one context but not the other.

(BTW I'm not a fan of coding ligatures myself, but they seem to be popular.)


Yes, if you do it on top of the lexer it starts to make sense to me. I still think the language should also support the corresponding "ligatures", so that no confusion can result if you happen to enter ≤ directly, but this is actually a nice solution to the problem of what to do in your language aware editor when the user enters <= : nothing! You just assign to different token classes different fonts.



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

Search: