On 2026-06-13 15:38, Bart wrote:
On 13/06/2026 13:35, Janis Papanagnou wrote:
On 2026-06-13 12:14, tTh wrote:
On 6/13/26 12:03, Bart wrote:
Seriously? You have a language where you can literally do this:
ÿÿ #include <stdint.h>
ÿÿ int32_t int32_t;
ÿÿ int32_t = 0;
and that is just fine; just "don't do it"! In that case, we might as
well allow:
ÿÿ int int;
Can you understand how crazy the above looks from outside?
Yes. (And I suppose everyone here understands that!)
Thank you for at least acknowledging that.
Huh? - There's nothing to acknowledge here since it's obvious.
All I intended to say with that was that you are constructing
strange reasoning based on trivialities. - This is actually a
well known and often applied rhetoric move; hunt for agreement
by stating a triviality to get assurance for all the debatable
stuff.
Languages have various possibilities to define their lexical rules,
their syntax, and their semantics.
It's certainly quite common to have _reserved words_ that may only
be used in certain syntactical contexts. But there's also languages
that allow context-depending placement of names that happen to be
also tokens of the language.
Consider, for example, in shell:ÿÿ for for in in do ; do : ; done
In the case of 'int32_t' this is supposedly a core C type but it is
quite unknown to the language until you include a particular header.
Yes. That's something that I (also?) don't think is good language
design. (Many things in "C" I actually consider to be kludges and
quirks; but so what?)
For what reason do you want to discuss all the design decisions of
the C-language? (I'm certainly not the appropriate partner for you
since, depending on the project, I either use "C" - as it is! - or
use another (for the respective task) more appropriate language.)
But, specifically, and for whatever product I develop, I wouldn't
use any proprietary, non-standard, home-brewed product. - So your
(repeated!) advertisement of your toys is meaningless.
[...]
Such pieces of code are a result of a programmer's sick brain and
not the problem of a language.
Such pieces of code are 100% *enabled* by the language so, yes, you can blame the language.
(My statement was on the shell-code. Your examples about "C". Just
noting.)
Since you might not have noticed; I don't write such shell-code.
And I also don't complain (in this respect) about shell's design.
It was about that there's different design options on that level.
What I said was that in either language you have to make decisions.
The shell-designers obviously didn't want to restrict use of values
and names, therefore they consider context.[*] In other languages
they may have different name spaces (cf. Algol 68 "stropping"), or
they use _reserved words_ (as already mentioned). The problem with
the former is that some people (like you) might not like "stropping".
Other folks might not like being restricted in their choice of names
to non-reserved words only. Languages like "C" have reduced these
reserved keywords; at the cost of other syntactic arguable choices,
choices that I personally don't like.
There's obviously no clear "design principle X is good" and "design
principle Y is bad" that fits everyone. (And I'm sure only your own
personal language designs are the only ones that fits your liking.
I'm fine with that.)
I, for example, would like to use common abbreviation for locally
scoped entities, like 'Interface if;' or 'int if = 0;' - but
I cannot do that; I have to follow to the rules that the language
designers have set. (And the 'if' example is not restricted to the
C-language, it's quite common to be a reserved word in languages!)
You cannot fundamentally change "C" as it is; not after more than
five decades (since its birth), and also not after it had been
standardized; it just makes no sense to even start an argument on
that. - If you think it's "bad" don't use it.
These examples are not possible in mine for example,
due to different scoping rules.
That's fine. If you find someone who is interested in your language
he might appreciate it (or not; can't tell, and I don't care).
[...]
Quite draconian, I know! A programmer can still do 'crazy' stuff, but
they have to work harder.
The point that had been tried to convey was that it's *not* in the
first place a language issue; it's an issue the programmer invented.
Consider, example for, text this. From composed punctuation it
language rules is the of words English and. Just not artifacts
possible defined say would such English it to positive language
badly the is create I that is because am you. Would the, text
and rightly, of writer blame you so that.
Oh, wait! I'll translate that for you:
Consider, for example, this text. It is composed of words and
punctuation rules from the English language. I am positive you
would not say that the English language is badly defined just
because it is possible to create such artifacts. You would,
and rightly so, blame the writer of that text.
I'm with you (of course) that a language should be safe, and clearly
defined. But your examples and personal problems [with "C"] are not
rooted in the language (that it allows writing stupid things) but in
the person who writes such code, either in practice or (as you) just
for purpose of an argument.
The attitude here seems to be, if you can write nonsense in any language anyway, then why bother making it harder to do so? Let's have fewer
rules and make it easier!
Can't tell (and don't want to speak) about attitudes. What repeatedly
had been said here was that you cannot change the "C" language just
as you (or anyone else) would like. - "C" is not important enough for
me to engage here. But if you feel there's something essential that
should (and could, without breaking anything) be changed, I'd suggest
to contact the standards group and submit a proposal.
Janis
[*] But note that they also used 'do'...'done' instead of 'do'...'od'
because of existence of the Unix 'od' command.
[...]
--- PyGate Linux v1.5.17
* Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)