Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.misc > #2171

Re: 100 Things

From "Rod Pemberton" <dont_use_email@xnothavet.cqm>
Newsgroups comp.lang.misc
Subject Re: 100 Things
Date 2014-05-03 17:30 -0400
Organization Aioe.org NNTP Server
Message-ID <op.xfazchgy6zenlw@localhost> (permalink)
References (9 earlier) <op.xe658kjo6zenlw@localhost> <bsfp7pFd2otU9@mid.individual.net> <80t8m95178c0kkmshpumeac4vj7j1af5m8@4ax.com> <op.xe9t1gh56zenlw@localhost> <oh8am9p0qs6egcjkbj4k7dt2a18uis4j46@4ax.com>

Show all headers | View raw


On Sat, 03 May 2014 15:39:17 -0400, George Neuner <gneuner2@comcast.net>  
wrote:
> On Sat, 03 May 2014 02:37:54 -0400, "Rod Pemberton"
> <dont_use_email@xnothavet.cqm> wrote:
>> On Sat, 03 May 2014 01:29:10 -0400, George Neuner <gneuner2@comcast.net>
>> wrote:

>>> Rod is correct that C defines 'byte' as a minimal addressable unit and
>>> defines characters as data which fits into a byte.
>>
>> Oh, I thought Ian was saying I made the wrong assumption on which
>> languages were being discussed.  I thought C, C++, and variations
>> were under discussion.  So, I was going to go back and check what
>> languages were being discussed, but didn't.
>>
>> Before that, I thought Kaz was saying C didn't support sizes other
>> than 8, 16, 32, 64, which it can.  Standardized microprocessor
>> architecture is what lends itself to 8-bits and multiples.
>
> I haven't seen the whole thread, but ISTM Kaz [will correct me I'm
> sure] is arguing that C doesn't have mechanism to semantically define
> new numeric types (or subtypes), so programmers are de facto
> constrained to those types that C provides.
>

True.

Oh, wow, okay, maybe *I* should re-read the entire thread ... ;-)

> Which is true with the minor exception that you can abuse bitfields to
> create a restricted width integer.  It doesn't buy you very much
> because bitfields are restricted to register width [or less!] and the
> result still is just a C integer with the same semantics only having a
> smaller +/- range and maybe slower access.

Yeah, I always thought the problem was that C doesn't have a carry
flag even though most microprocessors do.  In assembly, you can use
the carry flag to construct larger integers from smaller ones.  In C,
the code to do that is a bit of a mess.

> E.g., there is no way to define your new integer type to have
> different semantics such as arbitrary range, or a range with gaps, or
> saturation vs wrap-around arithmetic, or overflow signaling, etc.

True.

You're limited to what C provides, or whatever you can concoct.
There is no formal method to extend the language proper.


Rod Pemberton

Back to comp.lang.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

C: 100 Things "BartC" <bc@freeuk.com> - 2014-04-29 17:57 +0100
  Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-04-30 07:40 +0100
    Re: 100 Things "BartC" <bc@freeuk.com> - 2014-04-30 12:16 +0100
      Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-04-30 13:54 +0100
        Re: 100 Things "BartC" <bc@freeuk.com> - 2014-04-30 14:39 +0100
          Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-04-30 20:18 +0100
            Re: 100 Things "BartC" <bc@freeuk.com> - 2014-04-30 22:40 +0100
              Re: 100 Things Kaz Kylheku <kaz@kylheku.com> - 2014-04-30 22:09 +0000
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-04-30 23:36 +0100
                Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 11:03 +1200
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 09:47 +0100
              Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-05-01 00:35 +0100
                Re: 100 Things Andy Walker <news@cuboid.co.uk> - 2014-05-01 11:03 +0100
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 20:16 +0100
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 12:44 +0100
                Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-05-02 11:11 +0100
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-02 13:32 +0100
                Re: 100 Things "James Harris" <james.harris.1@gmail.com> - 2014-05-02 16:42 +0100
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-02 17:54 +0100
          Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 11:01 +1200
      Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-04-30 21:13 -0400
        Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 09:26 +0100
          Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-01 16:08 -0400
      Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 13:42 +1200
        Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 09:35 +0100
          Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 21:02 +1200
            Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 10:40 +0100
              Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-01 22:06 +1200
          Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-01 11:08 +0200
            Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 11:02 +0100
              Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-01 13:57 +0200
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 15:12 +0100
                Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-01 17:18 +0200
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 17:04 +0100
                Re: 100 Things Kaz Kylheku <kaz@kylheku.com> - 2014-05-01 18:30 +0000
                Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-01 16:08 -0400
                Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-02 08:30 +1200
                Re: 100 Things George Neuner <gneuner2@comcast.net> - 2014-05-03 01:29 -0400
                Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-03 02:37 -0400
                Re: 100 Things George Neuner <gneuner2@comcast.net> - 2014-05-03 15:39 -0400
                Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-03 17:30 -0400
                Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-04 20:05 +1200
                Re: 100 Things George Neuner <gneuner2@comcast.net> - 2014-05-04 13:28 -0400
                Re: 100 Things Ian Collins <ian-news@hotmail.com> - 2014-05-05 07:40 +1200
                Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-01 22:00 +0200
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-01 23:24 +0100
                Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-02 08:59 +0200
                Re: 100 Things "BartC" <bc@freeuk.com> - 2014-05-02 09:53 +0100
                Re: 100 Things "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2014-05-02 11:22 +0200
                Re: 100 Things Kaz Kylheku <kaz@kylheku.com> - 2014-05-01 18:26 +0000
                Re: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-01 16:08 -0400
                Re: 100 Things Kaz Kylheku <kaz@kylheku.com> - 2014-05-02 02:49 +0000
  Re: C: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-04-30 22:08 -0400
  Re: C: 100 Things "BartC" <bc@freeuk.com> - 2014-07-25 23:53 +0100
    Re: C: 100 Things "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-07-26 05:38 -0400
      Re: C: 100 Things "BartC" <bc@freeuk.com> - 2014-07-26 13:51 +0100
        Re: C: 100 Things rick.c.hodgin@gmail.com - 2014-10-25 04:48 -0700
  Re: C: 100 Things "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2014-10-25 04:50 -0700

csiph-web