Tilton
DRANK

2019-05-07In 2000, the programmatic browser differences were perplexing, so I made a tool to help manage the problem. I started with something similar to ecomcon (see How JavaScript Works, Chapter 23). I would have special markers in the source that designated sections of code that would only be delivered to particular browsers.<~ns4~layer.visibility = "hide";~> <~ie5~layer.style.visibility = "hidden";~>The convention of combining angle brackets with special characters was popularized by PHP. I chose ~tilde because it is rarely used in HTML, JavaScript, or English.I then thought to add variables.<~set~year~2000~> <~get~year~>If a variable could contain a sequence of digits, I should be able to add them.<~set~next year~<~add~<~get~year~>~1~>~>At this point I should have noticed that this language was going to be inexcusably ugly, but astonishingly, I did not notice at the time. I kept pushing on, inspired by better languages like TRAC and LISP. I determined that this was the wrong appr…

crockford.com
Related Topics: