Sujet : Re: question about linker
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 05. Dec 2024, 11:59:45
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vis132$1ig7f$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 05.12.2024 00:57, Bart wrote:
On 04/12/2024 22:58, Keith Thompson wrote:
Bart <bc@freeuk.com> writes:
OK, if it's so simple, explain it to me.
>
I'll pretend that was a sincere question.
Let's put it this way: if somebody asked me what the rule was, I
wouldn't be able to tell them.
If that is true I suggest to read one or two textbooks.
But as you are actually a language designer I would suppose that
it should suffice if you look at the constructs and think about
them; about the syntactic options and requirements of separate
statements, their separation/termination, embraced blocks, and
empty statements. From anyone who implements a language (like
you did) I'd certainly expect to get that just by own thinking.
[...]
Consistency? I posted a bit of Algol68 the other day; each function
definition needed a semicolon, to separate it from the next.
Why do you explicitly name functions here? - Semicolons are a
general (sequentializing) separator in Algol 68, and not really
different from other programming languages.
[...]
I'm aware of how messy and conistent it is. I've said that languages
that use ";" as a separator probably fair better, [...]
(Oh, I thought you said you preferred terminators in languages.)
[...]
My own made a compromise here: use ";" as separator,
(I know that from Awk, where I regularly use that feature.)
but introduce some
rules so that explicit ";" is rarely need. I think that wins.
Would that then be (like in Awk) that you then assume the line-end
as separator? (For a scripting language I think it's okay. YMMV.
But generally I would certainly consider that to be a Bad Idea.)
I said that my generated code has to use ":;" after each label; it looks
weird.
It's funny that you put such an emphasis on labels. - Jumps to
labels have academically been long deprecated but, more importantly,
in my practical work I never had a need to use them (or even think
or considering to use them). (I suppose it's how one got socialized
to design and write programs.)
[...]
[...]
Of course, if it was just me, then it would be pointless ranting. 'How
hard is to add the semicolon?'
Well, 'How hard is it to delete the semicolon' from my above example?
You obviously have problems on a level that other folks don't have.
Janis