GithubHelp home page GithubHelp logo

Unicode operator symbols about curv HOT 4 CLOSED

curv3d avatar curv3d commented on May 22, 2024
Unicode operator symbols

from curv.

Comments (4)

TLC123 avatar TLC123 commented on May 22, 2024

I like some better than others.

90° == 90*deg Yes agree 
≤ ≥ ≠ Yes agree
¬a == !a No improvement 
a·b == dot(a,b) Mmh slightly unclear 
a×b == a*b or cross(a,b) -- not sure which is better Yes agree a×b 
a÷b Yes but no major improvement
√a  -- what is the precedence of the √ operator? Yes agree 
a∧b == a&&b  Nah not for me 
a∨b == a||b.    Nah not for me 
x→x+1   ==   x->x+1 Yes agree 
for (i ∈ 1..10) Not for me no
π == Pi Yes agree 
τ == tau Yes agree 
∞ == inf Yes agree
x↑y = x^y No less clear 

from curv.

bluecube avatar bluecube commented on May 22, 2024

from curv.

doug-moen avatar doug-moen commented on May 22, 2024

The best reason to implement this feature is to make Curv programs easier to read.

The best reason not to implement this feature is what @bluecube said: it's too hard to type the Unicode characters.

I did some research, and it is not easy to configure all of your computers to have an easy to remember and uniform keyboard interface for typing Unicode technical symbols. Linux systems have a mechanism where you hold down the Compose key, type a 2 character mnemonic, and you get a technical symbol. For example, Compose <= gives ≤. And that's very nice. But you have to configure the Compose key, and you can't type a π this way unless you edit a config file and add a custom key binding. I don't yet know how to configure these same key sequences on a Macintosh. If there was a standard, cross platform solution that was easy to use and covered all of the popular technical symbols, then the Unicode operator feature would be more feasible.

Another alternative for making Curv programs easier to read is to store the program in ASCII on the hard drive, but configure your editor to use typographical tricks to make the on screen presentation more readable. Syntax colouring is one popular trick. Another is to use a programmer's ligature font, so that, for example, <= is presented on screen as ≤.
https://www.hanselman.com/blog/MonospacedProgrammingFontsWithLigatures.aspx

from curv.

doug-moen avatar doug-moen commented on May 22, 2024

Based on @bluecube's comment, I don't think this is a good idea right now, so I'm going to close the issue.

from curv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.