← Back to context

Comment by quink

12 years ago

Just to give everyone here a rough idea, the most annoying thing I found recently is that the function:

$ZCONVERT(stringVar, "O", "JS")

Which escapes stringVar into a valid JavaScript string without quotation marks doesn't escape line separator or paragraph separator (U+2028 and U+2029), when it should.

This was also a bit of a problem in browsers, JSONP and the JSON spec a while ago. Life in the MUMPS world isn't as bad as you'd think. Except for a lack of nice libraries. You do not want to know when regexes made it into the language. Last year. But there has been something similar - pattern matching - which alleviated the need for them a bit. And calling out to DLLs is fairly easy. It's really driven more by the healthcare industry than anything else.

Also, here's a short FizzBuzz I wrote:

  f i=1:1:100 w ! w:'(i#3) "Fizz" w:'(i#5) "Buzz" w:'$x i

Written in pseudocode:

  for i=1:1:100 {
    write newline
    write if not i%3 "Fizz"
    write if not i%5 "Buzz"
    write if not cursorposx i
  }

Shorter than any other FizzBuzz I've seen other than Perl, yet probably more readable.