4 ms·
Is <= equivalent to ⇐ or ≤ ? Personally, I'd love a keyboard that had a ≤ key and a programming language that recognized that symbol.
by billpg 7y ago
Is <= equivalent to ⇐ or ≤ ?
Personally, I'd love a keyboard that had a ≤ key and a programming language that recognized that symbol.
- Insanity 7y agoIf you want the symbol just to avoid typing an extra key, you can use a workaround. Get a keyboard with some extra keys (or a small side-board) and just get a ≤ key. Then just program it as a macro for <=. Wouldn't really solve the "programming language recognizing the symbol" Though that could probably be hacked in as well if you _really_ want to. I mean, I know this is not ideal. I'm just throwing out bad ideas :D
- ufo 7y agoOn Linux I love using the "Compose" key to type these unusual characters. It works better mnemonically than having special keys for everything. One language that uses unicode symbols liberally is Agda. Since it is a proof assistant, being able to use mathematical symbols helps a lot. They even remap the backspace key on Emacs to act as a sort of Compose key for typing all the symbols.
- mcphage 7y ago> I'd love a keyboard that had a ≤ key On a mac, hit option + "<". I can't help you with the language, though.
- b2gills 7y agoIn Perl6 <= is equivalent to ≤ say 4 ≤ 5; # True say 4 ≤ 4; # True say 4 ≤ 3; # False say 4 <= 5; # True say 4 <= 4; # True say 4 <= 3; # False Specifically they are the exact same subroutine. (The normal operators are just subroutines with a special name.) say &infix:« ≤ » =:= &infix:« <= »; # True (The =:= operator is basically the same as pointer equivalence.) The line which creates this equivalence is the following: my constant &infix:<≤> := &infix:«<=»; https://github.com/rakudo/rakudo/blob/b0dd44b006dc44da5695b28c53be52a5772f08a4/src/core/Numeric.pm6#L320 https://github.com/rakudo/rakudo/blob/b0dd44b006dc44da5695b2...