Evan Martin (evan) wrote in evan_tech,
Evan Martin

some thoughts on familiarity

I did a bunch more hacking on my toy programming language last night, but I'm not going to say anything more about it because it's totally vaporware. But it's fun to think about!

D has a few interesting ideas (I actually have some similar ones) but I can't help but think that language designers don't look at other languages much. Or maybe they just don't like them? It's hard to escape liking what you're familiar with, which makes innovation difficult.

Do you know the rules for C++ const? What's the difference between const char * and char * const? The answer is that the latter prevents you from modifying the pointer and the former prevents you from modifying the pointee (the char[s]); C++ reads from right to left. Why? You read pointers from right to left, too¹: char *p is a pointer to a char, not a "char pointer" (though we're comfortable with that phrase because we've used it so much). D's "easier declaration syntax" is still exactly backwards from the way you read it in English.

I keep thinking back to a post I wrote about currying a few months ago. I realize now that I completely missed the point. I know I was "smart" and capable about thinking hard back then, but somehow that just wasn't enough. I hadn't really realized how much working with OCaml so much has given me a new outlook on things.

1 This was probably motivated by the parser: the first token is a keyword, not a star.

  • blog moved

    As described elsewhere, I've quit LiveJournal. If you're interested in my continuing posts, you should look at one of these (each contains feed…

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • treemaps

    I finally wrote up my recent adventures in treemapping, complete with nifty clickable visualizations.

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.