4 ms·
I'm sorry, but having a quick glance to the syntax I could not get why you added another symbol in the boolean operators... Isn't it supposed to be a modern syn
by az09mugen 9mo ago
I'm sorry, but having a quick glance to the syntax I could not get why you added another symbol in the boolean operators... Isn't it supposed to be a modern syntax ?
This feels old and clunky
- YougOtricked 9mo agoAre you talking about quantum boolean logical operators? && is for boolean, and & will be for single bit, &&& is for quantum booleans, such as qtrue &&& both = both. the logic operators with 3 symbols are qbool, !! is for qbool, and ^^ is qbool xor, then && || ! == != are bool, and & | will be bitwise logic for singular bits.
- az09mugen 9mo agoExcept for the name in itself, nowhere in the features it is explicit that the language does quantum computation, in addition to traditional computation.
- YougOtricked 9mo agoDid you read the readme? look it directly says Quantum Features Quantum C is the world's second quantum programming language (at least, that more than like 2 people would ever say the name of(now that statement is true)), but the first that doesn't require a $10M quantum computer! Quantum Booleans qbool qb = both; // Superposition! Both true AND false! qif (qb) { println("True path"); // Executes! } qelse { println("False path"); // ALSO executes! } Quantum Logic Operators // Note these are not for normal booleans &&& - Quantum AND ||| - Quantum OR !! - Quantum NOT ^^ - Quantum XOR === - Quantum EQUAL !== - Quantum NOT EQUAL |&| - Collapse OR (convert to bool) &|& - Collapse AND (convert to bool)
- YougOtricked 9mo agothe readme specificaly says that they are quantum logical operators. Should i also specify that normal bools exist?
- YougOtricked 9mo ago& is used, so && is boolean (ofcourse almost all languages use && for and), and &&& is for quantum boolean which has 4 states, because & and && are used. Should i clarify this more in the syntax demo file and the readme and docs?