Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.compilers > #3257

Re: What attributes of a programming language simplify its use?

Path csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Newsgroups comp.compilers
Subject Re: What attributes of a programming language simplify its use?
Date Wed, 7 Dec 2022 12:13:54 +0100
Organization Compilers Central
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <22-12-010@comp.compilers> (permalink)
References <22-12-001@comp.compilers> <22-12-003@comp.compilers> <22-12-004@comp.compilers> <22-12-007@comp.compilers>
MIME-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Info gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="95592"; mail-complaints-to="abuse@iecc.com"
Keywords types, design
Posted-Date 07 Dec 2022 11:45:10 EST
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
In-Reply-To <22-12-007@comp.compilers>
Xref csiph.com comp.compilers:3257

Show key headers only | View raw


On 12/6/22 6:56 PM, Keith Thompson wrote:
> Hans-Peter Diettrich <DrDiettrich1@netscape.net> writes:
>> IMO C basic syntax is a bad base. As long as declarations and
>> expressions can be distinguished only by the type of an identifier (type
>> name or variable name) it's not a good idea to add new keywords that can
>> be confused with variable or type names.

Nobody seems to disagree with my opinion?


> Instead weird constructs like
>> "long long" for int64_t have been introduced, while "int int" stays
>> equivalent to "int".
>
> long long and int64_t are not the same (though int64_t may be the same
> type as long long in a given implementation).  long long is *at least* 64
> bits.  int64_t is *exactly* 64 bits, and must have a 2's-complement
> representation and no padding bits.

You are right, my sloppy wording was not appropriate in this NG :-(

>  "int int" is a syntax error.

I could not find in the (older) C++ grammar why "int int" should be a
*syntax* error. Aren't both "int" and "long" simple-type-specifier's
which can occur multiple times in a decl-specifier-seq?

It looks to me like additional rules apply which decide that
   "long int"
   "long long int"
   "long int long" //what's that?
are all valid while
   "long int long int"
throws an "two or more data types..." error.

In former times it was much easier to decide with a single basic type id
(int...) and type modifiers (long...).

DoDi

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-01 14:20 -0800
  Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-02 02:09 -0800
  Re: What attributes of a programming language simplify its use? Thomas Koenig <tkoenig@netcologne.de> - 2022-12-03 10:25 +0000
    Re: What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-03 22:16 +0100
      Re: What attributes of a programming language simplify its use? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-06 09:56 -0800
        Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-06 12:43 -0800
          Re: What attributes of a programming language simplify its use? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2022-12-07 10:14 +0000
        Re: What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-07 12:13 +0100
          Re: What attributes of a programming language simplify its use? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-07 17:53 -0800
            Re: What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-08 21:42 +0100
              Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-08 14:44 -0800
                Re: C types, was What attributes of a programming language simplify its use? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2022-12-09 15:01 +0100
              Re: C types, was What attributes of a programming language simplify its use? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-12-08 18:35 -0800
              Re: C types, was What attributes of a programming language simplify its use? David Brown <david.brown@hesbynett.no> - 2022-12-09 13:21 +0100
        Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-12 00:00 -0800
      Re: C types, was What attributes of a programming language simplify its use? "marb...@yahoo.co.uk" <marblypup@yahoo.co.uk> - 2022-12-09 07:40 -0800
        Re: C types, was What attributes of a programming language simplify its use? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2022-12-11 10:45 +0000
        Simple to implement and to use Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-12-11 19:41 +0200
  Re: What attributes of a programming language simplify its use? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-12-03 23:33 +0000
    Re: What attributes of a programming language simplify its use? gah4 <gah4@u.washington.edu> - 2022-12-03 17:15 -0800

csiph-web