Another newbie design question

Sion Arrowsmith siona at chiark.greenend.org.uk
Tue Dec 18 10:01:22 EST 2007


 <MartinRinehart at gmail.com> wrote:
>I've designed a language, Decaf, for beginners. I've got block
>comments but not multi-line strings.
>
>If you can only have one or the other, which is more helpful?

Given a one-or-the-other choice, any editor worth using can do
"comment/uncomment region", and if only to-EOL comments are
available, it will do that for you instead of using block
comments. So block comments are not really a useful language
feature. Unless you're expecting your beginners to grind out
their code in Notepad.

On the other hand, they are completely orthogonal features.
Multi-line strings in Python are not comments, and treating
them as such is as misguided as using raw strings for Windows
filenames. What would you have to say about a language which
had no specialised comment syntax whatsoever, and expected
you to use semantically irrelevent string literals?

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
   "Frankly I have no feelings towards penguins one way or the other"
        -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list