Slashdot Mirror


Why Haven't Special Character Sets Caught On?

theodp asks: "Almost forty years after Kenneth Iverson's APL\360 employed neat Selectric hacks to implement Special Character Sets to express operators with a single symbol, we're still using clunky notation like '<>', '^=', or 'NE' to represent inequality and cryptic escape sequences like '\n' to denote a new line, even though the Mac brought GUI's to the masses more than twenty years ago. Why?"

117 comments

  1. Because... by Anonymous Coward · · Score: 0

    Because it's simple, it's easy, and it works. Absolutely no need to futz with it.

    Anymore pointless issues you'd like to hash out?

    1. Re:because... by hankwang · · Score: 1
      And for non-visual characters like 'newline'.... what other idea, exactly, did you have? \n is pretty straightforward, once you know how it works.

      Yes, it is of course completely silly to want a special character for newline, since you already have one: it is generated by the enter key. The idea of \n is that you can see that there is a linebreak without clobbering the layout of your code. If you want to have some symbol X for newline, then you will have to escape X if you want to display an X instead of a newline. It makes no sense.

    2. Re:Because... by Phreakiture · · Score: 1

      The key sequence to type any of the polyglyphs that we use is immediately apparent, because the keys are labelled with each of the monoglyphs that make up those polyglyphs. On the other hand, you have to take the time to teach newbies to type double-bucky cokebottle to get such-and-such a character, or you have to convince the newbie to RTFM. Ain't happenin'.

      Now, if we could have some agreement on the meanings of some of these polyglyphs, that would be good.

      --
      www.wavefront-av.com
  2. \n cryptic? by Anonymous+Crowhead · · Score: 2, Insightful

    And special characters wouldn't be?

    1. Re:\n cryptic? by Ithika · · Score: 1

      I'm confused - don't I just hit 'return' whenever I want the special character which '\n' represents?

  3. Why? by wowbagger · · Score: 5, Insightful
    Why are we not using characters that are:
    1. Hard to generate on a standard keyboard
    2. Not standardized in the specifications of the language.
    3. Not standardized in the character sets of most non-bitmapped displays.
    4. Not standardized in HTML markup.


    Gosh, I don't know!

    Now, if you will excuse me, I need to create a local variable named <The Symbol for the Artist Formerly Known as "The Artist Formerly Known As Prince">
    1. Re:Why? by aminorex · · Score: 1

      It's easy now to implement input methods, html does standardize most of the characters, and large unicode fonts are generally available, so most of these considerations are obsolete. It would be a useful and trivial hack to make gcc accept & ne; et filia, for example. The result would be fewer bugs, more readable code. It is really is about time. Usually a new level of technique does not become predominant until it offers substantial advantage at marginal cost. Now that international communication, WYSIWYG, are prevalent, now that
      universal encodings have been standardized and memory is cheap, it's time to leave behind the fetters of ASCII. There will always be a C99, so it's no threat to the few botique, niche applications where a more expressive style is contraindicated.

      --
      -I like my women like I like my tea: green-
    2. Re:Why? by Philip+K+Dickhead · · Score: 1

      %20

      --
      "Speaking the Truth in times of universal deceit is a revolutionary act." -- George Orwell
    3. Re:Why? by schon · · Score: 1

      I need to create a local variable named

      I thought he'd changed his name to "The Artist who until recently was known as the Artist formerly known as Prince"? :o)

      (Bonus: a cookie for anyone who gets the reference. :o)

    4. Re:Why? by Alef · · Score: 1
      Hard to generate on a standard keyboard

      Well, most of them are, but some of them are not. It was a while since I used OS X, but if I recall correctly it only took [some modifier key] + "/=" to type the not-equals sign. Quick as well as intuitive. Just because it is possible to imagine completely useless characters doesn't mean we ought to limit ourselves to ASCII.

      Not standardized in the specifications of the language.

      Wasn't the original question more in the lines of "why are they not standardized in the specifications of the language[s] yet"?

    5. Re:Why? by Weird_one · · Score: 1

      Does he say "Ni!"?

      --
      "Secrecy is the keystone of all tyranny. Not force, but secrecy ... [sic] censorship.
    6. Re:Why? by Bake · · Score: 1

      Monty Python and the Holy Grail - The Knights Who Say Ni.

      Sorry, the Knights Who say Ecky Ecky patong zoooop *mumble* ... err ... The Knights who until recently said Ni.

      Now. Where's my cookie? :-)

    7. Re:Why? by usrusr · · Score: 2, Interesting

      fewer bugs?

      i think you remember what happened when "they" introduced extended characters in the DNS: the only people who really used them were the phishers who could now create domain names with the new characters that looked very much the same as the names they were trying to imitate so browsers had to make a 180 for security reasons.

      source code is a slightly different environment, but there it can already be different enough to visually distinguish between l and 1 in many fonts, or the various variations of an empty circle (oO0). You may argue that nobody willingly uses variable names like ll1O0, l1100 and lllOO, but rare those bugs _will_ happen more often once people start using exotic characters in source. source code has to be as unambigous as possible on every level.

      ps: and while standard encondings exist it is still commonly seen that nonstandard characters get lost for example in cvs, "why waste time on configuring when only some umlauts in comments get lost?", but well, there are "standards", not "one standard", that makes great difference.

      --
      [i have an opinion and i am not afraid to use it]
    8. Re:Why? by Bastian · · Score: 1

      I wouldn't say it's hard to generate special characters on a standard keyboard - AppleScript uses them, and it's just hitting key combinations like "option =" and "option enter." The real issue for me wasn't that stuff, it's that it's a bunch of crap that I have to type in which isn't on the keyboard. != or are easy, I know what they mean, and I know how to type them. A real mathematical "not-equals" symbol is non-obvious and figuring out how to type it requires consulting the manual.

      Apple's solution is probably the best at the moment, but it's still lame because AppleScript's commands for these symbols are not the same as the ones that are used by the OS. Also, it's not going to be easy to implement on PCs unless the PC world decides to add an option key as well.

    9. Re:Why? by jonadab · · Score: 1

      > You may argue that nobody willingly uses variable names like
      > ll1O0, l1100 and lllOO

      I would argue that no programmer worth his salt willingly uses fonts that don't make those characters easy to distinguish. I certainly don't. However, unicode characters are another matter; I only care about how my fonts display safe and sane characters (i.e., ASCII characters with decimal values from 32 through 126). Unicode characters can show up as a character-sized box as far as I'm concerned, because they don't belong in my source code, and the editor shows control characters as \nnn escapes anyhow (except for line endings (which it displays as newlines) and horizontal tabs (which it replaces with spaces in most modes, because that's how I have it configured)).

      --
      Cut that out, or I will ship you to Norilsk in a box.
    10. Re:Why? by Sensible+Clod · · Score: 1

      So, you're saying it's all about space?

      --

      The difference between spam and poop is that you don't have to dig through septic tanks looking for real food. -- Me
    11. Re:Why? by Philip+K+Dickhead · · Score: 1

      Yeah.

      The space between one's ears! ;-)

      --
      "Speaking the Truth in times of universal deceit is a revolutionary act." -- George Orwell
  4. Input method simplicity by Kelson · · Score: 3, Insightful

    In programming? Most languages seem to be designed with ASCII in mind, so you have to stick with what's available there.

    In general? I think it's a matter of input methods. Give me an input method where it takes only two keystrokes to type "" and I'll use it instead of "NE" or "". If I need to use a vulcan death grip, remember a code, or find it in a character map, I'm only going to bother when I have motivation: either making a point, like earlier in this paragraph, or making a polished document. Why go to the effort in a casual email, or a forum post, when it's much easier to type "" instead?

    1. Re:Input method simplicity by Eric+Giguere · · Score: 2, Insightful

      If I need to use a vulcan death grip

      If you think emacs editing sequences are obscure now, imagine how much more fun they'd be with all those "special characters"...

      If you're a touch typist, you really want to minimize the number of keys you have to press simultaneously to get something done, especially if you can't use hands separately to do it. Typing two or more normal characters together is much easier.

      Eric
      Get some stroller advice here
    2. Re:Input method simplicity by ecloud · · Score: 1

      Just because Emacs takes up every possible key combination all by itself doesn't mean the rest of us have to deal with that limitation. :-)

      Realistically the control key should be used for control functions, and alt (or option) key should be somehow involved in accessing alternate characters. Doesn't the labeling make it obvious?

      And if you need more control keys than you can get with just control, then maybe you need to be using a command line. Using esc from "insert mode" to get to a command line makes reasonable sense doesn't it? Or alternatively (or additionally) there are function keys and menus, and function keys could be used to navigate menus, too. IMO you should be able to see on the screen what a function key does. WordPerfect couldn't do it that way in 80 x 25 text mode but nowadays we could do it. And some day there might be keyboards with displays in their function keys.

      (note - I'm not advocating either vi or emacs, or any other program that I've actually seen and used. All these existing programs are so steeped in stupid traditions that we now just take for granted, that most people can't even imagine a truly usable alternative.)

      So back on topic - what's wrong with having an onscreen menu that you use to select an alternate character set, which can be accessed either by mouse or a simple keyboard shortcut? Then you can switch easily back and forth between English, some other language, math symbols, dingbats and so on.

    3. Re:Input method simplicity by vidnet · · Score: 1

      How about dead key input or keyword replacement? You can try them in Vim with :imap != <C-k>!= or :abbreviate != [not-equals sign here].

      Try one and type if(a != b), Vim will turn it into a nice \ne sign.

      The dead key approach could easily be included in X (X.org doesn't seem to support making arbitrary keys dead now). The keyword approach (which I prefer) would have to be on an editor-by-editor basis.

    4. Re:Input method simplicity by Blue+Lozenge · · Score: 1
      Give me an input method where it takes only two keystrokes to type not-equal and I'll use it

      If you're on a Mac, just type Opt-= for not-equal, Opt-< for less-than-or-equal, Opt-> for greater-than-or-equal, and so on...

  5. GUI? by jrgeek · · Score: 0, Troll

    The only GUI I need is vi, thank you very much...

  6. Why haven't dvorak keyboards caught on? by Neil+Blender · · Score: 2

    I mean, they're better, right?

    1. Re:Why haven't dvorak keyboards caught on? by Anonymous+Brave+Guy · · Score: 1

      So was Betamax, but it never reached critical mass.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    2. Re:Why haven't dvorak keyboards caught on? by jonadab · · Score: 1

      > I mean, they're better, right?

      No, Dvorak is not better than QWERTY.

      The idea that the Dvorak layout is "better" comes from the assertion (which has never been conclusively established, as far as I am aware) that it allowed for a faster typing rate, i.e., a larger words-per-minute number. That *may* have been relevant in the 1950s, when a large percentage of typing consisted of retyping existing material, because typewriters didn't have save and restore, copy and paste, or print merge capability (among other things). This is no longer anything like relevant, because these days almost all typing is on-the-fly, coming right out of the brain, which only goes so fast. I used to be able to type 50wpm or so, back when I used to type in things that I'd first written out on paper (e.g., compositions that I'd worked on at the library or in study hall). It's been so long since I've done that, I don't think I can type faster than about 30wpm now, yet I find myself pausing here and there, because I'm still typing faster than I can compose.

      Now, there *are* problems with the QWERTY layout, problems having to do with certain keys (notably shift) being way too far out of the way, other keys (notably CAPSLOCK and the left window key) too easy to hit by mistake, and with one entire digit going unused, because there's one big fat spacebar where both thumbs go; however, Dvorak makes these same mistakes in pretty much exactly the same way.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    3. Re:Why haven't dvorak keyboards caught on? by pthisis · · Score: 1

      Betamax was never better than VHS. It was theoretically superior on picture quality, though most side-by-side reviews at the time of real equipment gave the edge to VHS except for a few short periods of a couple of months when Beta would implement a picture advance before VHS. But Beta was vastly inferior on sound quality and on tape length.

      See, for instance, http://technology.guardian.co.uk/online/comment/st ory/0,12449,881780,00.html

      Of course, whether or not Dvorak is any better than Qwerty is open to debate; I've seen at least one study showing that Qwerty's design (alternate hands to avoid typewriter jams) also turns out to be quite helpful to typing speed (alternating hands is faster than typing successive characters on the same hand), and that Dvorak typists with repetitive stress injury benefit by switching to Qwerty in exactly the same way that Qwerty RSI sufferers benefit by switching to Dvorak. The only studies I know of show major Dvorak benefits were done by the inventor and salesman of the Dvorak layout.

      See, for instance, http://wwwpub.utdallas.edu/~liebowit/keys1.html

      --
      rage, rage against the dying of the light
    4. Re:Why haven't dvorak keyboards caught on? by Anonymous Coward · · Score: 0

      No, Dvorak is not better than QWERTY. The idea that the Dvorak layout is "better" comes from the assertion (which has never been conclusively established, as far as I am aware) that it allowed for a faster typing rate, i.e., a larger words-per-minute number.

      This is like saying "The idea that a 2005 VW New Beatle is better than a 1964 VW Beatle is based on the fact that it can go faster, but both can go the speed limit, therefore it's not at all better".

      Yes, it may be better in that one area. No, that is not the only difference. For example, the Wikipedia page has a list of 6 advantages of the Dvorak keyboard, of which "speed" is part of #2.

      I typed on QWERTY for 10+ years, before switching to Dvorak (which I've now used for 10+ years), and I can type just as fast (70-80 wpm) on either one. Speed is *not* the determining factor.

      The advantage of Dvorak is that I don't feel like somebody's whipping my wrists while I type. QWERTY is downright painful to use for extended periods of time.

      If you're a musician, you know what I mean. Some passages are easy to play: a scale is generally easy for your fingers. Some passages are hard to play: they require all sorts of weird contortions.

      The reason it isn't popular is that most people simply don't type that much. If my job requires me to be on my feet all day, I'm going to get a good pair of shoes. If my job requires me to sit down all day, I'm going to get a comfy chair. My job requires me to type all day, so I'm sure as hell going to find the most comfortable keyboard layout I can, and Dvorak is it. (I know half a dozen other people who use Dvorak, and they also spend all day using a keyboard.)

      Anybody can walk on broken glass, and if you only do it rarely, you might not even see anything wrong with it.

  7. Argh! Here's another reason! by Kelson · · Score: 4, Funny

    I entered an actual not-equal sign in that post, and Slashcode stripped it out!

  8. YOU might be by DrSkwid · · Score: 2, Funny

    my OS is where UTF8 [pdf] was invented.

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    1. Re:YOU might be by Spock+the+Baptist · · Score: 1

      I find your sig vacuous.

      --
      "Oh drat these computers, they're so naughty and so complex, I could pinch them." --Marvin the Martian
    2. Re:YOU might be by DrSkwid · · Score: 1

      come on, gimme some space, I'm under a lot of pressure

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  9. Take a step back and look at this question again by LeninZhiv · · Score: 4, Insightful

    \n is cryptic and APL isn't?

    I'd say it's more a question of 'choose your poison'. There is a learning curve whether one aims at mathematics-based notation schemes or historical computer science notations, and the market has already chosen (30 years ago) which one it prefers.

    And not without cause. Human language looks a lot more like modern programming languages than mathematical notation, and a major goal of programming language design is to make it as straightforward as possible to tell the computer what you want it to do. One might object that by that argument Cobol is better than C, but humans, especially experts working in a specific domain, like abbreviations too. Cobol is hated because it doesn't allow you to abbreviate, not because it is hard to read, after all. APL or other such specialised syntaxes are hard to read and they don't fit closely enough with the way non-mathematicians think to be intuitive.

  10. Listen to me by Profane+MuthaFucka · · Score: 5, Interesting

    Now sonny, sit down a second and listen to grandpa rant about the good old days. The truth is, when I talk about the good old days, it's not because the days were actually good. It's because I have a sucky memory and questionable taste.

    Now it is TRUE that I once did do programming in APL. This was on an old Zenith 8088 based PC clone with 640K of memory, a CGI display, and a 20 meg hard drive. The system itself worked rather well. If you could work a line editor, the development environment was all you could want. The problem was all the little stickers that went on the keys. Every key mapped to about three other symbols besides the normal ones, and just about every key had a little sticker on it. It was NOT fun. Just because your computers can display characters that look like Chinese doesn't mean that it's a good idea.

    --
    Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    1. Re:Listen to me by david+duncan+scott · · Score: 1
      Hey, was that a Z-100 (with the S-100 bus) or one of their later straight clones?

      Only reason I ask is that I remember the Z-100 as having a very nice keyboard, dished like a Selectric and with a good feel to it.

      --

      This next song is very sad. Please clap along. -- Robin Zander

    2. Re:Listen to me by abradsn · · Score: 1

      I've actually programmed for an 8088, and an 8086; you should check some of your facts. Only the amount of memory is accurate, and that's not even really completely true, because some of it was allocated for the dos shell only. Then again, you did say that your memory was sucky. Also word perfect was not a line editor.

    3. Re:Listen to me by stanmann · · Score: 1

      Let's see, he was on a ZENITH, using assumedly a CUSTOM APL line editor(like ed or edlin) I fail to see where you find inaccuracies, since I've seen APL on a ZENITH.

      --
      Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
    4. Re:Listen to me by Profane+MuthaFucka · · Score: 1

      All my facts were correct, and we didn't use Word Perfect. The line editor was built into the APL environment. Programs were not edited in a separate editor.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    5. Re:Listen to me by Profane+MuthaFucka · · Score: 1

      It wasn't that old. It was a Zenith PC clone from 1986. Just like this one: http://williambader.com/museum/zenith/zenith.html. I think the APL we used was APL*PLUS, but as I said, my memory is sucky.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    6. Re:Listen to me by plsander · · Score: 1

      APL on a Zenith?!?

      That's the problem... APL was best on IBM terminals-- Like the 3270, or even a 5100.

      Took the CS language survey course in college - APL on a Cyber 170 on ASCII terminals -- nasty three char tags in place of the operators.

      Later I took a calculus course (Calculus of Vectors and Spaces, otherwise known as Magic Math) -- we used APL on a 370... much easier to understand.

    7. Re:Listen to me by abradsn · · Score: 1

      What can I say? People did things that were unwise back then. You weren't forced to use a line editor were you? You could be using one now too, but it is a bad idea.

    8. Re:Listen to me by Profane+MuthaFucka · · Score: 1

      Dude, just stop. Please. The line editor was built into the APL environment, and was the easiest way to get programs into the environment. The PC's we were working with were in a university lab, and didn't have any network connections, or any other software on them. I could have used edlin which came with DOS, I suppose, but that's a fucking line editor too.

      I was forced to use a line editor. There you go.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
  11. Efficient by Threni · · Score: 2, Insightful

    Because we don't need to change for the sake of it, to a system which isn't supported by a lot of software and hardware. Why not just change your software to interpret the characters as an image, like some already does with smilies?

    1. Re:Efficient by oZt · · Score: 0

      I really hate those lame smileys...

  12. Simple by fm6 · · Score: 4, Insightful
    Same reason the Dvorak keyboard has never caught on -- nobody wants to learn to type all over again.

    Display was never the issue with APL. There are implementations of APL that use keywords instead of symbols. It's just that turning everything into an operator makes for really dense, hard-to-maintain code.

    I'm reminded of Forth, which lacks APL's weird symbols, but shares its reputation for dense code. In its heyday, Forth programmers justified using it by claiming it made them more productive. And that's true — if you define "productivity" as "number of lines of new code hacked out per day". But code isn't just written, it's maintained, and dense languages are not maintenance friendly.

    1. Re:Simple by swdunlop · · Score: 1
      Actually, Forth programmers pride themselves on how few lines they write each day. A favorite Chuck Moore quote:
      Another aspect of Forth is analogous to Ziff compression. Where you scan your problem you find a string which appears in several places and you factor it out. You factor out the largest string you can and then smaller strings. And eventually you get whatever it was, the text file, compressed to arguably what is about as tightly compressed as it can be.
  13. Because of old and crappy software, and laziness by metamatic · · Score: 2, Insightful

    Because standardization of extended character sets, via Unicode, is a relatively recent development. Hence, there's a lot of software around that still doesn't handle Unicode.

    For example, I switched to bash because tcsh didn't cope with Unicode. Mozilla's Unicode support is incomplete--card symbols defined in the HTML 4.01 standard don't show up properly on the Mac, even though it definitely has them in its standard fonts. Many text editors don't support Unicode. And so on.

    In fact, it's only recently that Slashdot was fixed to allow us to use words like "cliché" and enter amounts of money in Pounds Sterling like £5.99, even though those 'special' characters were part of HTML 1.0. Forget about using the aforementioned card symbols on Slashdot—we got 1996's CSS a couple of months ago, maybe we'll get 1999's HTML 4 in 2008?

    Next you add in the fact that most people are too lazy to even learn to spell correctly, far less learn how to type an e with an acute accent, and you have a recipe for today's state of the web.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  14. it is really a deep one. by torpor · · Score: 4, Insightful

    {disclaimer: i'm a closet fontographer.}

    i've thought about this question since 1978, as i have encountered over the years since then a grand litany of different ways of describing symbols in such a way that they can be standardly used, and i have come to a very simple answer. humans are stuck on a symbol treadmill with infinitely smooth bearings.

    fontography is a lesson of symbols .. and the description of these symbols is limited by strict hardware limits: economic, social, cultural elements all have a part to play in the definition of input devices. where i say QWERTYZXCV, you say QWERTZYXCV.

    we haven't seen terribly wide-spread specialization of symbols because of the producer-/consumer- cults of USKEY101, and peoples unfamiliarity with alt-numkeypad chops, and Mac vs. PC, and ASCII vs. UTF-8, and XML vs. .bin, and "X" vs. "Y", blah blah, ad infinitum..

    the fact is, perhaps deep down inside we know we should be grateful for what we've got, and let the "!=" and ">=" expressions, 2 lonely bytes in a vast nasty sea, stand as testament to the human desire to at least, a little bit, get along on the same key. they may not be pretty, but pretty much everyone can get to those two bytes and use them when they need to .. its only a tiny clique can do the alt-numpad thing, and even fewer who choose to jump out of the ASCII pool and towel off..

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
    1. Re:it is really a deep one. by The+Cydonian · · Score: 1

      One possibility is to define not equal to as a special Unicode symbol that can be produced by typing '!' and '=' one after another. A bit like how you'd produce amlauts and all those cool European characters, and Indic characters on a US 101 keyboard.

  15. because... by Malor · · Score: 1

    The real question here is 'Gosh, languages don't use all the same syntax to represent mathematical ideas. Isn't there some way we could force them to do so?' And the answer is, succinctly, no.

    And for non-visual characters like 'newline'.... what other idea, exactly, did you have? \n is pretty straightforward, once you know how it works. I submit that some random symbol would be worse than what we have now.

    The musician Prince tried the glyph substitution trick, if you recall, and it wasn't tremendously successful.

  16. Forth by LWATCDR · · Score: 1

    I tried to learn Forth once... I thought it was made for people that thought asm was to straight forward.
    There does seem to be a sweet spot for code density vs readability.
    c and c++ seems to have found it for most people.
    At one end you have COBOL, Pascal, and Ada.
    At the other you have Forth APL.
    c, c++, c#, python, java, and the other c like languages seem to be in the middle.

    --
    See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    1. Re:Forth by abradsn · · Score: 1
      It depends on how you look at it, but I think you could arrange for many variations of this.

      Most people would agree that Java, c#, perl, and python have high level constructs that are fairly core to their langauge implementation.

      C, C++, and to some extent Pascal (modern day Pascal) seem to be on a similar tier with the ability for inline code, memory management, and inline assembler. Also the generated code is fairly straight forward when compared to the assembler output.

      Almost nobody uses cobol, forth, or ADA anymore so learning them seems like a silly thing, but you might as well throw fortran in there too.

      Computer Langauges are usually grouped according to the following method.
      • Languages that include built in lists, hashtables, user defined types, and do the memory management for you. (Eventually this list will hopefully include built in Parallel programming constructs). The languages are usually allow OOP but that is not written in stone.
      • Languages that don't provide these tools for you except through extension libraries. Usually, they allow faster machine specific code, and are easy to implement on new hardware.
      • Languages that don't provide much of anything for you. Good luck.
    2. Re:Forth by Piquan · · Score: 1

      Hmmm... interesting. I've never heard that division before; it sounds pretty much like an HLL/low-level language distinction.

      I tend to avoid such divisions when I'm speaking to others. It is far too easy to fall into the the Blub paradox. You tend to evaluate programming languages by going down the power scale from whatever you've learned, and therefore fail to recognize that there's a range up from what you've learned. If somebody generates a brilliant new language that has the potential to make programming simple, and you use this scale, then you'll only think it's as powerful as the most powerful language you've used.

      That said, when I'm learning new languages, I do tend to use a similar idea internally. But this is only for a loose thought process about how to get things done in the language, and isn't meant to judge the language's merits... otherwise, I risk not evaluating merits that the language has that I haven't encountered.

      That said, my scale also includes an entry with first-class functions and lexical closures, an entry for the "doesn't support recursion" languages (Fortran 77, early BASIC, etc), an entry for syntactic (as opposed to lexical) macros, and an entry for first-class classes (like Java, Objective C, and Smalltalk). A no-prize to the first person who guesses my language of choice.

      I deliberately didn't order those reasonably, since I don't think that it's a good idea to think of these as an ordering. Instead, you can use them to help gauge the character of a language.

    3. Re:Forth by LWATCDR · · Score: 1

      Actually ADA and Cobol are still used a lot. I hope on new programs are written in Cobol but there is still a lot of old code being used.
      Ada was popular in Europe and is popular enough to have a GNU compiler available.
      That being said my divisions where based on the level of verboseness of the actual source code as opposed to the features of the language.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  17. Re:Because of old and crappy software, and lazines by Kelson · · Score: 1
    Next you add in the fact that most people are too lazy to even learn to spell correctly, far less learn how to type an e with an acute accent

    Yep. Note that "smart quotes" didn't come into general use until Microsoft implemented them in the auto-complete features in Microsoft Word--the same ones that will do things like correct "cafe" to "café." Of course, they used non-standard characters to do it, leading to lots of Windows-only pages and programs like the Demoroniser, and they weren't quite smart enough, leading to millions of people worldwide using left-single-quotes instead of apostrophes for things like '90s or 'Twas--and not just in Word documents, either!

    Still, it was the fact that it was, essentially, effortless, that led to people actually using them instead of the straight-up-and-down quotation marks and apostrophes that we have on the keyboard.

  18. Re:Because of old and crappy software, and lazines by DrSkwid · · Score: 1

    recent by geological time

    UTF was invented and used as the *only* charset in an OS before Windows 95 was even in beta

    http://plan9.bell-labs.com/sys/doc/utf.html

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  19. data entry by TheSHAD0W · · Score: 2, Insightful

    I think a large part of it is because, even if we have the ability to display the characters, we don't have a convenient way to enter them. The keyboard doesn't have a Sine symbol key. Further, expanding the keyboard to include these symbols will just make it unwieldy. I suppose one could have the display automatically convert sequences into special characters, much like modern word processors perform auto-superscript, but this might cause problems when editing. I personally prefer it as-is.

  20. Two questions: by Just+Some+Guy · · Score: 0, Offtopic

    1. Do you own Wikipedia stock?
    2. even though the Mac brought GUI's to the masses -- brought GUI's what to the masses? Poor GUI - what if he didn't want his possessions to be widespread?

    </smartass>

    --
    Dewey, what part of this looks like authorities should be involved?
  21. Lowest common demoninator by Craig+Maloney · · Score: 4, Insightful

    It's pretty simple: Lowest common denominator. Creating special character sets creates incompatibilities with other machines out there. That's why ASCII was such a boon, and why character sets like PETASCII, ATASCII, and others fell by the wayside. (And if you really want some character set fun, try EBCDIC sometime).

  22. The current way is easier. by Aldric · · Score: 1

    All you need to do is have an ASCII chart handy and you can deal with text on any platform. Plus, the special symbols aren't on my keyboard. If I have to go hunting through obscure key combinations I need a pretty damn good reason!

  23. Troll Article? by slashflood · · Score: 0, Offtopic

    That's one of the worst Ask Slashdot articles ever - it almost tops this one. Is it meant to be a troll? What exactly is the connection between your question about special character sets and the link to Wikipedias "Apple Macintosh" entry? Apple fanboyism?

    Back to your question: What should be included in the special character sets? Do we need a set for every programming/markup language?

  24. What special character sets? by Kickasso · · Score: 0, Flamebait

    There's one character set, it's called Unicode and we're using it everywhere. If two-bit Pearle code running braindead websites like Slashdot can't handle the entirety of it, then someone (hint: not me) might have a problem.

  25. Which characters by Julian+Morrison · · Score: 1

    Suppose you go to the Unicode folks and say "lets use a spare set of codepoints to encode programming language constructs".

    OK, so, which constructs?

    Well, we've got the basic operators of C. Java and C++ can share a lot of those. Then we've got the stuff in Ada, they have a few of their own. And ocaml has a few more. Haskell can use some of the ocaml ones, but we'll distinguish them with a diacritic to mark them as lazy...

    Oh drat, someone sent me a program in Perl, and I haven't got the right font. It just looks like line noise!

    1. Re:Which characters by AuMatar · · Score: 2, Funny

      No, you have the right font. Thats what perl always looks like.

      --
      I still have more fans than freaks. WTF is wrong with you people?
  26. Choice APL quotes by dstone · · Score: 1

    From the Wikipedia entry linked in the original post...

    "APL, in which you can write a program to simulate shuffling a deck of cards and then dealing them out to several players in four characters, none of which appear on a standard keyboard." - David Given (?)

    "APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums." - Edsger Dijkstra, 1968

  27. I've got a working APL box right here by Anonymous Coward · · Score: 1, Interesting
    It's a CBM SuperPET. It does APL, and it still works. All the keys have the freaky APL symbols on them, and as you probably know there were quite a few other symbols that you had to create by overstriking.

    Now, really APL is just functional programming in disguise, with a pathetic lack of flow control constructs. Now, if you're familiar with Scheme or LISP, you end up wondering just what the hell the point is of doing a bizarre sequence of keystrokes to produce a strange glyph, when you could instead just type out "reduce" or "map" or whatever it is you wanted to do.

    That said, if you're a Linux/X user and want to input oddball characters occasionally, I highly recommend getting familiar with xkeycaps/xmodmap. You can turn one of the more useless keys into Multi_key. You hit that key and do something like "e'" for é, "ss" for ß, "L=" for £ and so on.

  28. Once upon a time... by Piquan · · Score: 1

    Long ago, the Lisp Machines roamed the Earth. They have a pretty wide set of characters available, as well as a swath of bucky bits. When people were writing for just Lispms, they'd use the extra characters sometimes. But then the code couldn't be brought over to other machines easily, or sent to a line printer, or... well, you get the idea. When Common Lisp came out, it defined a "standard character set"... a minimal set of characters that a Lisp implementation must support, and portable programs could only use it. This put an end to the flagrant use of the non-portable characters.

    Same goes for the Knight keyboard at SAIL, the MIT keyboards that spawned the Lispms, etc, etc. The characters that aren't part of ASCII-- and aren't on most people's keyboards, let alone font sets-- cause too many problems.

    That said, AppleScript does allow the use of some other characters in the MacRoman set. For example, not-equals can be written with the not-equals character, or <>, as you prefer. Personally, though, I stick with ASCII. Not even INTERCAL was perverse enough to deviate from it.

  29. Take no RISCs by mnmn · · Score: 2, Funny

    Have a large number of individual characters rather than a few characters than can be combined in many ways?

    Why you sound like youre in favor of CISC.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
  30. And music is hard to read for non-musicians by Quarters · · Score: 3, Insightful

    \r\n, =, !=, etc... make sense to programmers. They understand the language. Just like the design of 32nd, 16th, 8th, 1/4, 1/2, and whole notes, along with extra notation to modify their true length of play and volume, makes sense to musicians. Why waste time and effort to make it readable for the masses when the masses probably don't care? If they did they'd learn to read the language.

    1. Re: And music is hard to read for non-musicians by gidds · · Score: 1
      Just like the design of 32nd, 16th, 8th, 1/4, 1/2, and whole notes... makes sense to musicians.

      Not to this one, it doesn't. Maybe that's coz I'm not from the US, though. I'd've understood if you'd said 'demisemiquavers, semiquavers, quavers, crotchets, minims, and semibreves', though; would that have made sense to you?

      --

      Ceterum censeo subscriptionem esse delendam.

    2. Re: And music is hard to read for non-musicians by Quarters · · Score: 1

      Not as you wrote them, no. But if I saw them in a musical score I would. The graphical notation of the language works within the bounds of the language, which was the point I was trying to make.

  31. Re:Take a step back and look at this question agai by Usquebaugh · · Score: 1

    COBOL is hated because it was a language designed for programmers not by programmers. Same as Java.

    Try C, LISP, SmallTalk or Ruby and you start to feel that the language is helping you. Cobol & Java fell like they are getting in the way.

    Persoanlly, I love ruby but that might just be me.

  32. Why? by sharkey · · Score: 1

    Because nobody wants to be seen typing on the "short" bus with a "special" character set.

    --

    --
    "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  33. Special Characters by russ_allegro · · Score: 2, Interesting

    What might be interesting is if you can have your keyboard switch modes.

    I could put the keyboard in math notation and automatically the keys on the keyboard display math symbols in a standardised pattern (like QWERTY is for letters but for math). Other modes could be added later.

    On slashdot a few months back there was a keyboard in which the labels on the keys are dynamic. I think that is going in the interesting direction.

    It reminds me of maybe how the computers in Star Trek Next Gen might behave. Where the terminal/key layout is specific to what you are doing (Engineering, medical, etc).

    Basically instead of having a stupid windows dialogs where you click on stuff, you can use the keyboard designed to do your task.

    It also amazes me seeing asian languages being typed in a computer.

  34. Questioning the Status Quo by yancey · · Score: 1

    You may as well ask why we don't use specialized languages for specific tasks, such as using C for pointers, Java for objects, FORTRAN for mathematics, etc. all within the same project, perhaps even in the same source file. Why should the compiler care what language we use? The computer can handle all those languages just as the computer can handle special symbols. Another similar question would be: Why don't we have specialized processors dedicated to certain tasks, like a speech processor, speech recognition processor, sound generation processor, video coding / decoding processor, I/O processor, and so on? I think the truth lies in the efficiencies of volume production. Specialization just isn't cost effective these days. People who do tend to reach out and try new ideas rarely get far today -- which is a real shame.

    --
    Ouch! The truth hurts!
    1. Re:Questioning the Status Quo by TheSkepticalOptimist · · Score: 2, Informative

      It's not the compiler programmers have to worry about.

      Sure, a compiler could in essense sort out a file written in a dozen different programming languages, but imagine a team of developers all with different programming backgrounds trying to figure out what each coded? Software design would cease to work.

      Software language is like spoken language in general, we all need a set of syntax and grammar rules so we can simply understand each other and effectively communicate. If you write a book using a random assortment of languages, is anybody going to read it? Talk to someone in 4 different languages and are you going to have an understandable conversation.

      Also, in reality, a compiler CAN'T actually be designed to parse and compile a file written in a variety of languages. Symbols and characters mean differnt things in different languages. How do you know when a code statement is complete? C uses the ; character, other languages rely on a linefeed or some other delimiting character. Some languages impose restrictions on how you place tabs in code even. How is a compiler going to know your intending a line to be written in Java while the next is in Pascal, then the next in C. How will a Java object be referenced by a C pointer or a FORTRAN formula or interact with other languages in the same program. Compilers need a rigid set of rules in order to parse code properly, and the syntax is important in order to ensure there are no errors while writing code or generating the machine language.

      There are really no specialized languages these days. Fortran may have been used for math/science based projects, COBOL for business, but most people could easily link a library of C functions that offer enhanced math capabilities even though C wasn't specialized for math. A good generalized language allows you to write the specialized code using it without limitations.

      Finally, I don't want to have to learn a dozen different languages to get the job done. I speciallize in C++ because I find it an effective way to develop the applications I am commissioned to write. While I can easily adapt to other languages or scripts for specific purposes, I don't want to have to learn FORTRAN simply to write some math formulas into my app. And I would shudder the day LISP makes a comeback in any way shape or form. Learning one language is easier then a dozen, and keeping specialized means your more effective and adept in using that one language. Its the old "Jack of all trades, master of none" addage, specialize or get left behind.

      Lastely, we could use single characters to represent those "klunky" two character symbols. But why? What is the beef with writing != for inequality. Would using single characters make the language easier to write or understand? Your assuming that all people can easily recognize a single character symbol as meaningful. Looking at the APL programming language, I couldn't understand half the characters and I have been programming for 12 years. Again, as someone mentioned, if your a software developer != and such are easily understandable and I don't think we need to rewrite software tools and keyboards to make a few people happy, yes, even if Apple released a GUI OS so many years ago (what that has to do with anything, I don't know)

      --
      I haven't thought of anything clever to put here, but then again most of you haven't either.
    2. Re:Questioning the Status Quo by Anonymous Coward · · Score: 0

      language in general, we all need a set

      "general; we".

      are you going to have an understandable conversation.
      How is a compiler [...] the next in C.
      How will a Java object [...] in the same program.
      What is the beef with writing != for inequality.

      "?".

      compiler CAN'T actually be designed

      "can't" or "_can't_".

      Some languages impose restrictions on how you place tabs in code even.

      "Some languages even impose restrictions on how you place tabs in code.".

      your intending a line to be written
      your more effective and adept
      if your a software developer

      "you're".

      in any way shape or form.

      "way, shape, or form".

      Your assuming that all people

      "You're".

      yes, even if Apple

      "Yes".

  35. Re:Take a step back and look at this question agai by epine · · Score: 1


    There aren't so many of us in this thread with the background to actually do so. I learned APL when I took a calculas course at the local university because I was applying to schools out of province where calculas was taught in the terrible idea known as "grade 13". The math course allowed me access to the CS lab and I soon started to thrive on being able to write programs in APL that ran a *lot* faster (sometimes factors of 10) than any of the programs written in compiled Pascal by the CS undergraduates (what a bunch of lamers).

    One needs to understand that in APL (as interpreted as it gets) is that certain idioms applied to large arrays are essentially super-compiled, in much the same way that the C++ non-container vector[[bool]] did funky stuff until they killed it (they have killed it by now, haven't they?) It was no small benefit to me in my jousting with the lamers that in APL I could focus all my talents on choosing the best algorithm, because I was never more than 80 keystrokes away from a major breakthrough. Except when the problem demanded certain kinds of data structures where APL was inherently unsuitable. It's a good thing no one ever challenged me to the fastest program to implement a position tree.

    I learned a lot from my time with APL because it reduces certain aspects of programming to its bare essentials, while saying almost nothing about anything else. I learned which portions of the programming task can be delegated to a superior notation, and which portions can't. For the most part I liked the APL notation. Stupid manipulations of the rank vector (reshape) using the rho operator to effect extra arguments to a function call, that was life in the gutter. So were the trig operators for that matter.

    At the same time, I don't miss most of the symbols / operators all that much either. There are three that have stuck with me ever since. The max/min (round up/down) operators (bar with a flat bit to the right at the top or bottom) and the high minus (minus sign tangent to the top of the regular digits).

    Let's assume we have a C language implementation from the day when an integer was 16 bits and a long was 32 bits. For this C language host, the expression -32768 does *not* do what one first supposes: represent the least possible 16-bit signed integer value, because this is parsed as the negation operator applied to the long integer constant 32768. How stupid. Give me back my high minus sign! The constant ambiguity between subtracting a positive constant and adding a negative constant does *not* help one in recalling to mind the derivation of the formula involved (with the original symmetries intact).

    Other symbols from APL I've continued to use in my own notation are the take and drop operators (preserving the overtake and undertake semantics) and the encode / decode operators. All the rest I've discarded.

    The other bugaboo I've retained having learned early how to think APL-style are definitions of the modulus operator (% in C/C++) for a positive modulus B, does not ALWAYS return a value on the semi-open interval [0..B). Howls of disgust when this function does anything different for negative values of A, a fraud of the highest magnitude perpetrated by the same idiots who neglected to supply the high minus sign in every other language I know.

    I must however reserve the innermost circle of hell, following along in P.J. Plaugher's footsteps, for those who implement malloc(0) to cause an "instructional" abend.

  36. Re:Take a step back and look at this question agai by crmartin · · Score: 1
    I don't mean to be difficult, son, but:
    • Grace Hopper was, and James Gosling is, most definitly a programmer. If you don't think COBOL was an advance at its time, you've just never coded 701 machine code.
    • If you think Java's syntax is radically different from C's syntax, you've never coded in one or both of them.
  37. No need by Bogtha · · Score: 1

    we're still using clunky notation like '', '^=', or 'NE' to represent inequality

    Unicode contains characters such as U+2260 (NOT EQUAL TO). Unicode has certainly caught on; all HTML documents use that character set, for instance. So why the need for a special character set?

    Perhaps you are asking why people don't choose to use such characters - I guess it's just ignorance. After all, if somebody who has gone to the trouble of submitting an Ask Slashdot doesn't know about these characters, why would the average person? Take a look at the code charts sometime.

    --
    Bogtha Bogtha Bogtha
  38. droolings of an idiot by epine · · Score: 2, Interesting


    The concept that APL code is "hard to maintain" is correct to first approximation, but it's more myth than reality when one digs deeper into the question. Most of the densest lines of code I once concocted in APL were 100% maintenance free: efficient and correct over the entire usable operand range. The density of the code squeezed out many degrees of freedom for making stupid errors even before you began.

    There were other factors, having little to do with code density, that made APL systems hard to maintain. One was the psychological feeling that written twenty lines of comments to describe one line of code was somehow ungainly. I overcame this feeling within myself rather early. In fact, I wrote so many lines of comments for each line of code that my first work-term supervisor wrote a program to crawl through all the functions in one of my workspaces to *remove* every line of comment I had written, because he somehow thought he would understand my code better if he could fit it all onto the screen at once. His problem was that he didn't understand the *concepts* in my code. One of the things about raw APL code is that there are few surface markers that distinguish necessary manipulations from deep concepts. In my C language code, the necessary manipulations are largely gathered together in the initialization statements for local variables. Well, how much a language design should be based on protecting the programming team from supreme idiocy?

    The second factor that made APL hard to maintain is that that it tried to force every concept to become a nail. The array primitive was surprisingly powerful, but it just didn't handle certain kinds of data aggregates at all well. And neither could you push this structure in the lexical direction, because there was no regex facility either.

    And finally, the notion of a "workspace" was itself suspect. Every function was it's own text. There was no text anywhere that declared or described or controlled all the global variables that the workspace would necessarily include. There was no textual grouping of related functions into a higher-order interface or language facility. These decisions were made because APL originated in the teletype era. It had nothing to do with expressive density.

    I think there is also an illusion at work that if you spend the day performing a maintenance task by visiting twenty source files and pawing through several thousand lines of code, that you are working with some greater efficiency than the guy who spent the whole day staring at single screenful of starkly beautiful APL scratchings. That's not so obvious to me having been there.

    OK, here's the thing. In APL if a programmer decided to cut corners and forsake the "stark beauty" that made APL a workable language, there was precious little left behind on the surface to betray the sloppy work standard. Take one look at a C program written by a programming in a sloppy mindset, you know right away you are maintaining the droolings of an idiot. In APL, it could take you an hour to parse beneath the surface to find that same incompetence leaping out. The C language has far more expressive scope for the droolings of idiots and I guess those markers are worth a lot at the end of the day.

  39. Re:Because of old and crappy software, and lazines by Anonymous Coward · · Score: 0

    I believe the Mac character problem is an issue with the fonts being old-style MacRoman versus Unicode.

    Slashdot always allowed HTML entities in the old days but disabled them for a while because trolls were making unicode art with them.

  40. For exactly the same reason. . . by munpfazy · · Score: 1

    . . . that it's much faster to write out an equation in LaTeX than using any WYSIWYG editor on earth.

    If there aren't enough buttons on the keyboard for all the symbols you need, it's much easier to represent the new ones as an obvious and transparent combination of the ones you already have than it is to construct complicated schemes to generate new ones.

    Until we experience a revolution in computer interface design, it's going to take at least two keys to create a not-equal-to sign. If people are going to be forced to remember a two key sequence, it's overwhelmingly easier if what they see on the screen is a literal representation of that two key sequence.

    Going to special characters replaces a single translation step (representation -> function) with two translation steps (encoding -> representation -> function). If you ask me, memorizing twice as many things so that you can avoid seeing ugly NEs and \ns is just crazy.

    What's more, even if you allow for special characters, there are still plenty of non-obvious representations to deal with. What's the math symbol for a conditional numerical equality as distinct from a definition, a string comparison, or a memory address comparison? Sure, you could standardize to a definition: triple equal signs, equal signs with little symbols above and below them, etc. By what's the point? If you have to learn the definition anyway, then it hasn't bought you anything over the existing schemes.

    Finally, if I may be permitted to pass from serious critique into parody verging on a flame, why not go one step further:

    We needn't stop with special characters. Why are we using clunky language-based schemes to represent all the other aspects of programming languages? Why haven't abstract symbolic representations for function and variable names caught on?

    After all, "case variable of" isn't exactly transparent, and it isn't closely coupled to the english definitions of those words. Just think how much cooler it would look translated as "schematic symbol for a multi-throw switch, abstract geometric shape, cartoon human figure with arms held out in a 'who, me?' expression." That would make for some beautiful code!

  41. Re:Because of old and crappy software, and lazines by metamatic · · Score: 1

    OS X definitely has the symbols as Unicode fonts, and they work in Safari. If Mozilla is still a Carbon application rather than Mach-O, that really needs fixing... I remember seeing an "experimental" Mach-O build back in the days of Mozilla 0.x, I'd have expected the real thing to be up to date by now.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  42. Re:Argh! Here's another reason! by Anonymous Coward · · Score: 0

    That's why there's a "Preview" button, loser.

  43. Simple Answer by Jump · · Score: 1

    The simple answer is: nothing is really gained by this. Why is english the language of the world? Because it is rather simple. Chinese won't replace english for the same reason. I would never ever consider writing a program with non-ascii characters, besides perhaps accented characters in strings. The reason is also very simple: have you ever tried to port a program to a different platform? I did it many times. Only the ASCII part survived. Sure, you may create a better standard than ASCII, but if you use it for programming, it will not improve your life. Abstraction is the core of every program. Nothing is gained by replacing != with something more readable if you have to define odd looking names all the time. In fact, it only makes it harder to read if you happen to run in technical difficulties with the new character set.

  44. Re: \n as newline by some+guy+I+know · · Score: 3, Insightful
    And for non-visual characters like 'newline'.... what other idea, exactly, did you have?
    How about U+2424?
    Actually, that's the symbol for a graphic representing a newline (a slightly raised N next to a slightly lowered L, shrunk and crammed together into an area approximately a single em-space wide), so maybe that's not such a good idea (as how would you represent the graphic itself in a string?).
    OTOH, a \ followed by U+2424 could better represent a newline graphically in a string.

    The reason that \n seems "pretty straightforward" is that most of us are used to it.
    The concept of backslash followed by a letter representing a control character started in C in the 1960s (or possibly even in earlier languages), and has been copied into dozens of other languages, along with other things like using % in printf strings to format variables (although some languages, like Ruby, are starting to offer alternative representations to %).
    Note that, in Common LISP, a newline is represented by ~% and ~& in formatting strings, and #\Newline (spelled just that way) represents a newline character outside of formatting strings.
    In Object Pascal/Delphi, a newline is represented by its decimal or hexadecimal equivalent, #10 or #$0A.
    Some languages, like Python and sh/ksh/bash/etc., allow an actual newline in a string itself, so no representation is necessary (although Python allows \n as well, in its non-raw strings).
    Other representations that I have seen in the past include ^J and ^M^J (for line feed and carriage return/line feed as control characters) and $ (for end-of-line in regular expressions (although the $ doesn't (usually) match the actual newline itself)) and in "list" mode in vi.
    --
    Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
  45. Re: \n as newline by Malor · · Score: 1

    So are you seriously asserting that \Unicode 2424 should be used in place of \n? Sure, it's pretty and all, but A) it takes a hell of a lot longer to type/specify using a keyboard, and B) common functions should be mapped to common characters. Newline is EXCEEDINGLY common, so it should be very, very fast to specify, not mapped to some obscure graphic buried somewhere in Unicode. (at least 2424 would be pretty easy to remember.)

    Your observations of the alternate newline syntaxes were interesting, but I submit that they're probably all inferior to the old \n standby. They all require quite a bit more typing... and newline should be really, really quick to embed.

    That aside, the whole thing of 'escaping' characters is a bit silly on some levels... because you run into all this weirdness when you're writing programs that make scripts (that possibly themselves make yet MORE scripts)... debugging how many escapes you need, and where, can take awhile. And escaping an escape character does something else AGAIN... this really does get pretty twisted. The whole IDEA of escaping strings may be a bit broken, a holdover from when we had only 64 or so characters to work with. Data being interpreted as a form of code is a bit dangerous, as we saw with all the formatting string bugs a year or two ago. But, like most dangerous things, it's also powerful.

    I wouldn't mind if we were to do it some other way entirely. Unicode might work, but we have only so many keys on the keyboard, and proper Unicode handling is complex. It would require modifications of millions of programs that don't yet support it. Maybe Delphi's idea of an interpreted code fragment, or possibly some internal constants in languages, would be a better idea than using codes to embed escape characters.

    I don't see things changing anytime soon, though. Like it or not, we're going to be stuck with \n for a LONG time. And, really... isn't it nicer than \U+2424?

  46. Re: \n as newline by some+guy+I+know · · Score: 1
    So are you seriously asserting that \Unicode 2424 should be used in place of \n? Sure, it's pretty and all, but A) it takes a hell of a lot longer to type/specify using a keyboard, and B) common functions should be mapped to common characters. Newline is EXCEEDINGLY common, so it should be very, very fast to specify, not mapped to some obscure graphic buried somewhere in Unicode. (at least 2424 would be pretty easy to remember.)
    No, I'm speculating that, visibly, it may be more indicative of an actual newline than \n.
    Also, I'm not suggesting that someone should have to type backslash alt u 2 4 2 4 or something similar to get a newline.
    Here are two ways to do it:
    1. Type \ <alt>+<return> (three keystrokes), and the keyboard handler sends \ U+2424 (two characters) to the editor, which places them in the text, or, even better,
    2. just type <return> (one keystroke), and the context-sensitive editor, seeing that the cursor is inside of a string, inserts \ U+2424 (two characters).
    Note that many editors these days, such as vim, can know whether or not the cursor is inside of a string, and so it should be possible to have different keyboard mappings for the return key, depending on where the cursor is.
    That way, when you type <return>, the editor can insert \ U+2424 if the cursor is inside of a string, or <newline> if it is outside of a string.
    Even better, the editor can insert \ n into the string so that it's valid ANSI C/C++, but display it as U+2424 in a different color to make it stand out as a newline character.
    That way you get the best of both worlds.
    --
    Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
  47. Re: \n as newline by Malor · · Score: 1

    That's actually not a bad idea. Wonder if someone will pick it up and run with it?

  48. Re:Take a step back and look at this question agai by arkanes · · Score: 1

    In fairness to the OP, if, like many programmers these days, you've never programmed or seen anything *but* C/C++ and Java, you might think the syntax is very different.

  49. Re:Take a step back and look at this question agai by arkanes · · Score: 1
    Let's assume we have a C language implementation from the day when an integer was 16 bits and a long was 32 bits. For this C language host, the expression -32768 does *not* do what one first supposes: represent the least possible 16-bit signed integer value, because this is parsed as the negation operator applied to the long integer constant 32768. How stupid. Give me back my high minus sign!

    Eh? I'm not an old fogey, so maybe C implementations back then sucked, but -32768 does indead mean the least possible 16 bit signed value. And C doesn't have a (binary) negation operator. "-32768" is a constant, it's not parsed or imlemented as "0 - 32768".

    The constant ambiguity between subtracting a positive constant and adding a negative constant does *not* help one in recalling to mind the derivation of the formula involved (with the original symmetries intact).

    I don't know what number system they use in APL, but in the one the rest of the universe uses, adding a negative and subtracting a positive are mathematically identical.

    I must however reserve the innermost circle of hell, following along in P.J. Plaugher's footsteps, for those who implement malloc(0) to cause an "instructional" abend.

    If you could provide a situation where malloc(0) wasn't a logic error, then perhaps the people implementing it might be more interested in making it work.

  50. Re: \n as newline by some+guy+I+know · · Score: 1

    Well, ":imap ^Q^M \n" works in vim to insert (the two-character sequence) "\n" when <return> is hit, but I can't figure out how to detect when the cursor is within a string.
    It would be nice if autocommand had a mode that would fire when entering or leaving a syntactic region, so that I could map and unmap the key that way.
    Oh, well; I will play with it some more when I have time.
    If I can figure it out, I will also set it up so that "^I" (tab) inserts "\t", etc.

    --
    Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
  51. I don't know, but... by rfisher · · Score: 1

    I am using expanded character sets. I've been using "&#8800;" and friends in AppleScript for years. In Scheme, I use "&#955;" instead of typing "lambda". I use the native2ascii program that comes with the JDK to use Kanji or Esperanto characters in identifiers. I wrote a similar preprocessor to expand "&#8800;" & friends in C source.

    I can't tell you why it hasn't caught on, but there's nothing stopping anyone from doing it today.

    (Although, it seems Slashdot doesn't like those characters...)

  52. I disagree by gurps_npc · · Score: 2, Insightful
    Most of you people are listing problems related to keyboards.

    That demonstrates a lack of vision.

    MAKE A NEW KEYBOARD.

    Not that hard to do. Almost all computers have function keys on top. The majority of users DON'T USE THEM.

    Just print up some new keyboards that have single symbols representing the major programer stuff, such as >=, To use them, print them above the F1,F2,F3, etc. access them by typeing shift F1, etc. etc. Allow them to be over-riden by programs that want to over-ride it.

    If Apple did this, it would catch on instantly. In one year, Microsoft would steal the idea.

    --
    excitingthingstodo.blogspot.com
    1. Re:I disagree by richg74 · · Score: 1
      While what you have said is right, I think you're missing part of the keyboard "issue". Many of us know how to touch-type: I learned years ago on a [manual!] typewriter. For us, the number of keystrokes (within reason) is not really a big issue. I will type this post without ever looking at the keyboard; although a Dvorak keyboard might be theoretically "better", the putative benefit is not worth the aggravation of the change for me.

      If someone really wanted to do this, there is not all that much standing in their way (for example, GUI environments generally allow keyboard re-mapping and shorcuts). That few people seem to do this indicates to me that there isn't a huge payoff.

      I have a notion -- and that's all it is, I can't cite any evidence -- that there is an "information density" (or, equivalently, a degree of redundancy) that people are used to from natural language. To the extent that a computer language differs greatly from that, I think it makes people uncomfortable. So APL seems opaque because it is too "dense", and COBOL seems ridiculously long-winded because of things like:

      ADD UNITS TO TOTAL-QUANTITY GIVING NEW-TOTAL
      In other words, I think there's a trade-off between "efficiency" and practical usability.
    2. Re:I disagree by rsdavis9 · · Score: 1

      Back in 1967 I first used apl. It was an ibm 360 in watson research center in yorktown heights ny. I connected to it from belmont ma with some kind of dedicated line. The interface was a ibm selectric typewriter with a special type ball. We either had a special key layout or sticky labels for all the keys. This way we had a wysiwyg interface. The key looked the same as what was typed. I spent every waking moment programming apl for the next 4 years. It was great. I believe that any problem could be programmed in apl in one line of code. I programmed all of the martin gardiner mathematical problems from scientific american. It was a lot of fun. I never produced anything usefull from all of this.

      So the point of the story is you need programmable keyboards that can change the glyph on them. This would enable the experimentation with new linguistic constructs for programming languages. I never could get into apl after that because of the keyboard problems. Who wants to stick labels on your current keyboard and obscure the real symbols. I suppose you could switch keyboars anytime you want to write your new language. What a pain. What made my '67 experience easy was the specialized keyboard that nobody changed.

    3. Re:I disagree by Eli+Gottlieb · · Score: 1

      And which symbols is it really useful to have symbol keys for across all languages?

    4. Re:I disagree by gurps_npc · · Score: 2, Insightful
      Our job is nto to design a new keyboard for all languages. Non-english speakers already make their own keyboards. But for English speakers, there are a bunch of simple symbols that should definitely go in.

      ...Math...

      Greater than or equal to

      Less than or equal to.

      Not equal to.

      ...Programming...

      New line symbol.

      Is it Alphabetically equal to (does not set, only used for asking. Equivelent to EQ, could co-opt the wavy equal sign)

      Is it Numberically equal to (does not set, only used for asking, Equivelent to == in many computer languages, could co-opt the triple line equal sign.)

      Then there are the common symbols that are not on the keyboard. These include

      paragraph mark

      pound mark

      the cross used to signify footnotes

      The copyright mark

      the registered trademark

      the small circle indicating temperature.

      These 12 symbols are used throught the english world. Again, the idea is NOT to make an english keyboard useable by for other languages, but instead to expand the use of the keyboard to include the 12 most common symbols used within the english world. Non-english language keyboards should of course expand their own keyboard, but that is up to them, not those of us that speak english.

      --
      excitingthingstodo.blogspot.com
  53. Re:Take a step back and look at this question agai by pthisis · · Score: 1

    If you think Java's syntax is radically different from C's syntax

    Syntax is one of the least important features of a language, and OP never said anything about them having different syntax.

    OP wrote:
    "Try C, LISP, SmallTalk or Ruby and you start to feel that the language is helping you. Cobol & Java fell like they are getting in the way."

    One can infer that he's in favor of strongly, dynamically typed languages with the exception of C (weakly, statically typed), and against strongly, statically typed languages (or at least those without type inference).

    I can venture a guess with reasonable confidence that he'd like python and scheme and would strongly dislike Pascal and Ada.

    For languages that fall outside of the spectrum he described (say, Tcl and VBscript, or Dylan and ML) I have no feel for what he'd like.

    Those guesses have nothing to do with syntax.

    --
    rage, rage against the dying of the light
  54. Re:Take a step back and look at this question agai by Usquebaugh · · Score: 1

    I ain't your son, got that pal?

    Compare COBOL to LISP which one came first? Which one can be applied to solving the most problems? Which one provides the most abstractions to the programmer? COBOL was in no way a step forward from LISP.

    Below is some history of the languages, pretty accurate IMHO.

    http://en.wikipedia.org/wiki/COBOL
    http://en.wikipedia.org/wiki/LISP
    http://en.wikipedia.org/wiki/Java_programming_lang uage

    You'll see that COBOL/JAVA was designed by committe before being in general use. Most succesful languages eventually get a committe but hopefully the langugae in use is strong enough to stop major changes being made by the committe.

    I've coded commercially in all the languages listed except 701, I have used Z80/6502/68000 though.

    As for C/Java the syntax is simialr, java was designed not to scare C/C++ programmers. But I never mentioned syntax, that may be how you judge a languugae but to me it's a trivial matter, what's important is what the language let's you do e.g. does the ANSI COBOL standard have recursion yet?

  55. Re:Argh! Here's another reason! by Anonymous Coward · · Score: 0

    Loser or not, he's got a point, asshat.

  56. Re:Argh! Here's another reason! by a11 · · Score: 0

    everybody knows the real losers are teh ones who use the preview button. although it's quite sad this fuckup sat there for an hour just to submit a comment explaining his mistake. then again, maybe I'm the one true fucking idiot who doesn't know the way to post over 1 comment an hour.

  57. Squeak uses them by Anonymous Coward · · Score: 0

    Squeak, an actively-developed version of Smalltalk that traces it's roots back to Xerox PARC, does use a few. When you type an underscore, it renders it as a character that looks like "<--" (but it's a single char).

    (Other Smalltalk variants typically use :=, a 2 character combination which was chosen to "look like" the original left-pointing-arrow that was used at Xerox. Squeak allows the := as well, but it doesn't look nearly as cool as the leftarrow - it's used for an assignment operator)

      Similarly, ^ renders as an up-arrow, not just a carat. It hearkens back to Xerox custom displays with custom character sets. Yes, it only works in the Squeak environment where it renders its own characters to a bitmapped (bit-blitted?) display, but it is the only surviving case of the custom characters that I know of (at least, that I use?)

    Mike

  58. Re:Take a step back and look at this question agai by crmartin · · Score: 2, Informative

    No, you're not my son, you're just another young moron who thinks links reflect knowledge. Of course, if you read your links you'll see that COBOL was driven by FLOW-MATIC; Java wasn't designed by a committee, but the version of C you've most certainly used was; and that LISP, FORTRAN, and COBOL are in fact exactly contemporary.

    If you had much deep knowledge of programming languages --- or had read the links you posted --- you'd also realize that Java has more in common with Smalltalk than pretty much any other conventional language in any way except syntax.

    What you probably don't know is that I stopped sleeping with your mother when I realized she'd have children that were ugly and dress funny.

  59. Re:Take a step back and look at this question agai by Usquebaugh · · Score: 1

    Ahh,

    my mistake I took you original post as having some slight oversights that I could gently point in the direction of understanding. My mistake, won't happen again with you. Apologies for wasting your time.

  60. The Cost of Not Having - as a Key... by oldCoder · · Score: 1
    If we had an assignment operator nobody (?) would have confused = with == inside a C if-statement and we surely would have saved the cost many times over by now.

    For crying out loud we coders have contributed a lot to computing (!) At least give us an assignment operator and a new equality operator on the keyboard. It's not as if we aren't sure we're going to need it in a few years!

    --

    I18N == Intergalacticization
  61. Re:The Cost of Not Having <- or by oldCoder · · Score: 1

    That is, '←' (left arrow)

    --

    I18N == Intergalacticization
  62. If The Compilers Change to Accept &ne; by oldCoder · · Score: 1
    If the compilers were able to process Unicode, and would accept ≠ where we now type !=

    Dang slashdot won't display the &ne; properly!

    Then the text editors could then gradually migrate to converting != on input to &ne; in the text and displaying it. For instance, notepad on windows will display unicode properly. Most other editors will too, like eclipse...

    --

    I18N == Intergalacticization
  63. Re:If The Compilers Change to Accept by oldCoder · · Score: 1

    By which I mean not only that the compilers would be able to compile UTF-8 files and so forth but recognize the unicode symbols as valid operators.

    --

    I18N == Intergalacticization
  64. It gets worse by DeVilla · · Score: 1

    Actually, I think it's worse than that.  Perl6 is adding unicode support in perl source.  So you think they'd be able to add support for all sorts of new operator.  But from what I can tell from the mailing lists they are just over loading the hell out of the question mark.

    @list = ? 1 2 3 4 5 ?;
    @list ? grep {$_ % 2}
          ? map {$_ ? 2}
          ? @newlist;         #  1,  9,  25
    @list3 = -? @newlist;     # -1, -9, -25
    @list4 = 2 *? @list3;     #  1, 81, 625
    @list5 = @list3 ? @list4; # -1,  1, -9,  81, -25, 625
    %hash1?a? = "alpha";      # { "a" => "alpha" }

    I think it's going to get a lot worse before it gets any better.

  65. because of programmers VS public by no13 · · Score: 1

    you want a special key for programmers ONLY?
    good

    try typing © in Turbo C++ v3 (The old IDE which EVERYONE in the c++ world has used, seen, or should do so, or at least the RHIDE clone)

    You CAN'T. That's because old legacy code such as that of Win Xp's "NT Virtual DOS Machine" (ntvdm.exe), TC++, MSDOS and others, don't support the extended character set for direct input AFAICT...

    Also... keyboards are designed for the "common" man.. you think Jackie Thommpson emailing his mommy about how he tricked the San Andreas police into arresting a cartoonist in a dream, will EVER use the proposed '!=' key? In his life?

  66. Re:Take a step back and look at this question agai by booch · · Score: 1

    Actually, I'd say Java has a lot more in common with Ada than it does with Smalltalk. Especially the way packages and threads work.

    --
    Software sucks. Open Source sucks less.
  67. Re:Take a step back and look at this question agai by crmartin · · Score: 1

    Well, of course Smalltalk doesn't really have either one, or even separate compilation, so there are similarities to Ada, C, C++, Eiffel, and so on, that distinguish Java from smalltalk. On the other hand, Java has the bytecode interpreter basis, closures of a sort, garbage collection, and a large standard class library with lots of GUI and network richness.

    Perhaps more to the point, Jim Gosling has been quoted as saying that Java was based on trying to bring Smalltalk to C++ programmers.

  68. Re:Take a step back and look at this question agai by booch · · Score: 1

    Interesting. I guess it matters which part of the language you look at. Thanks for the reply. Good points, except for the closures bit -- inner classes (which didn't come about until around Java 1.1) don't really compare to closures.

    Seems like if he really wanted to bring Smalltalk to C++ folks, he really should have found a way to popularize Objective C though. Especially since Sun was a part of OpenSTEP, which included what's probably the best GUI framework around to this day. It sure beats AWT and Swing. I suppose the mixed syntax of Objective C is a problem for folks not familiar with Smalltalk.

    I still think Java has the Ada "feel" to it. It feels "big", with its large library, and has a syntax that's overly verbose in some places. I can't think of anything in Java that reminds me of Eiffel though. (Could be because I never used Eiffel; I only read the book.)

    --
    Software sucks. Open Source sucks less.
  69. Re:Take a step back and look at this question agai by crmartin · · Score: 1

    Anonymous inner classes are closer, but I think I said "closures kinda sorta" or something to that effect anyway.

    The problem with Objective-C --- well, hardly the only problem, let's say a problem --- is that it loses the underlying virtual machine and thus shares C's problem that a large part of the behavior of a program can't be predicted until you know what machine its going to execute on. It's also relatiuvely hard to learn, since it has two syntaxes, C and Smalltalk-like.