Subject: Another newbie design question
From: bambam
Date: 12/18/2007 4:35:35 PM
Original languages were line oriented, newer languages were
block oriented.
Original languages has line comments. Newer languages had
block comments, and had line comments added back in.
So I would read that as line comments being more fundamental,
but people who used line comments got so sick of them that
they thought block comments would be a good idea.
(david)
<MartinRinehart@gmail.com> wrote in message
news:1dd387df-d4c8-495d-8d58-695033cbfffc@e6g2000prf.googlegroups.com...
> 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?
>
> Should I have both? (Make a strong argument here: my design principal
> is, "Designed by a backpacker: when in doubt, leave it out.")
Subject: Another newbie design question
From: Sion Arrowsmith
Date: 12/18/2007 3:01:22 PM
<MartinRinehart@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@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
Subject: Another newbie design question
From: Neil Cerutti
Date: 12/19/2007 6:22:41 PM
On 2007-12-19, Paul McGuire <ptmcg@austin.rr.com> wrote:
> On Dec 19, 10:48 am, MartinRineh...@gmail.com wrote:
>> This morning block comments disappeared from the Decaf design.
>> Maybe later today they'll be instantiated in the tokenizer.
>
> Out of the idlest of curiousity, does this language have a BNF,
> or some other form of grammar definition?
Might I suggest: laughs evilly, rubbing hands together?
--
Neil Cerutti
|