Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> world before markdown and not wanting to embed html in the page

Wdym



Unrestricted html leads to all sorts of nasty problems with user generated content. Things like <script> bringing in Javascript you don't want, or <iframe> pulling in content you don't want (and messing up the page) or in the days of table layout people just putting in </table>, or people with <a href="goatse.cx"> scattered about in links.

So, you limit the text that user generated content is allowed to use. And yet, you still need to figure out a way to allow links between pages within the site - but not allow the person to use an <a> tag.

The way c2 did it was with MixedCaseWords that were easy for a regex to pick out and create link targets to.

MixedCaseWords required no additional special characters to be used or worry about unmatched character pairs.


I liked CamelCase. The brackets are okay. They solve problems, but as you say (or at least imply) they create new problems that can make the code less elegant (IMO). As a user, the brackets are better, but as a programmer it be a headache. We invented, independently, network hyperlinks before the WWW and they were used in our lab, I don't remember how we did the links. The programmer is no longer with us, but I've messaged the person who had them done to see if he remembers. It only worked on our LAN, so amusing, but not as insanely compelling as the WWW. I'm curious to see if either CamelCase or [[]] was that natural a mechanism.


CamelCase is easy with a regex and you don't need to parse it. It completely avoids problems like how to handle

    [[[a link] with some more text and [[something else]]
Getting into parsing means more complex code and with that complexity comes for the possibility of bugs.

This was also at the time of the Cambrian explosion of Web 2.0 and user content. Lots of different sites took different approaches to handling it. The CamelCase link approach reads kind of clunky but is likely elegantly simple in implementation.

C2 was from the very early days and something that works, well, it works. Going to a full on sanitizer and larger set of allowed html leads forever chasing bugs and implementing features.

Compare also HN and the rather limited feature set. It is better to have something that works and move on rather than forever implementing features (often with backwards compatibility breaking cases).


Now it makes sense, thanks for the explanation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: