Slashdot Mirror


Symbolic vs. Mnemonic Relational Operators: Is "GT" Greater Than ">"?

theodp writes: "Mnemonic operators," writes SAS's Rick Wicklin as he weighs the pros-and-cons of Symbolic Versus Mnemonic Logical Operators, "tend to appear in older languages like FORTRAN, whereas symbolic operators are common in more recent languages like C/C++, although some relatively recent scripting languages like Perl, PHP, and Windows PowerShell also support mnemonic operators. SAS software has supported both operators in the DATA step since the very earliest days, but the SAS/IML language, which is more mathematically oriented, supports only the symbolic operators. Functionally, the operators are equivalent, so which ones you use is largely a matter of personal preference. Since consistency and standards are essential when writing computer programming, which operators should you choose?"

4 of 304 comments (clear)

  1. Re:Wow, a paper about GT by prunus.avium · · Score: 4, Interesting

    We're on /.. By definition we're all wasting time....usually instead of working.

    That being said, this raises some interesting questions about how our brains parse the languages. Would a mnemonic like GT be simpler to parse than >.

    Of course, I think this brings up the question of first language. Someone with English and the Latin alphabet may find the mnemonics easier but someone for whom the Latin alphabet is not their primary alphabet might handle the operators better.

  2. Ignored after the first sentence by OverlordQ · · Score: 4, Interesting

    They unfortunately used perl as an example. While yes Perl does have both gt and > one is a string comparison and the other is a numerical comparison.

    --
    Your hair look like poop, Bob! - Wanker.
  3. It's all squiggles by OrangeTide · · Score: 3, Interesting

    It's all squiggles on the screen that I have to learn to interpret in the correct context.

    --
    “Common sense is not so common.” — Voltaire
  4. Re:Typing versus Reading by Waffle+Iron · · Score: 5, Interesting

    On the other hand, students and people in-general have gotten > and < confused for a long time.

    Many decades ago, my first grade teacher explained that these symbols are like alligators: They choose to chomp on the bigger meal. I've never been confused on these symbols since that day.