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


Groups > comp.lang.c > #140976

Re: list of chars to introduce in future c

From David Brown <david.brown@hesbynett.no>
Newsgroups comp.lang.c
Subject Re: list of chars to introduce in future c
Date 2019-02-14 09:45 +0100
Organization A noiseless patient Spider
Message-ID <q439ri$cfs$1@dont-email.me> (permalink)
References <8b6a2c57-8c85-40ef-9c8a-0f77ab380586@googlegroups.com> <q41ads$s9n$1@dont-email.me> <q41opl$n17$1@news.albasani.net>

Show all headers | View raw


On 13/02/2019 19:48, BGB wrote:
> On 2/13/2019 8:43 AM, David Brown wrote:
>> On 13/02/2019 12:16, fir wrote:
>>> this is not pure theory not as probably (if i will not die) one year
>>> i will be just implementing it and you will see it in some editor in
>>> a form of characters you may type in (feels like vague future now
>>> hovever)
>>>
>>> the topic is about that that it seems to me that c needs more
>>> characters (i dont know how to name them, punctuation characters? i
>>> mean such non letter characters like *&^%$#_+_=-;',.<> and so on just
>>> wider charset) in its definition
>>>
>>> those chatracters would allow more expression than today set when you
>>> sometimes
>>> think what to use and youre limited in options as sometimes things
>>> dont fit
>>>
>>> i would hovever like be well understood, i dont want to make C a mess
>>> like some communicator for kids full of weird looking emoji icons or
>>> something like that
>>>
>>> i more think i would just like something
>>> like present set of graphical characters (everybody knows them, those
>>> few tens of asci ones) just with some addition.. if now you got them
>>> 30 or some more i would like to get some more (like 15 additional at
>>> first and eventually some more later but this should will be well
>>> rethinked sett, thinked to be 'new classical' set like preious set is
>>> clasical, and most probably be not open to free extensions
>>>
>>> i think this way
>>>
>>> question is what chars to introduce (to make this new classical set
>>> (codename it ascii-II or something like that)
>>>
>>> (secondary question is how to implement it in txt documents,
>>> prefereably it should be 2-byte unicode conformant)
>>>
>>
>> First, you would have to have an idea of /why/ you want extra
>> punctuation characters.  What are they for?  Are you talking about
>> introducing new operators?  If that is the case, you have to ask:
>>
>> 1. Would they useful enough to justify a new operator?
>> 2. Would they be clear enough and unmistakeable to users?
>> 3. Can users type them conveniently?
>> 4. Can users display them conveniently?
>> 5. Can they be added without making the language more complicated?
>> 6. Can they be added without making all of today's tools (compilers,
>> checkers, IDEs, highlighting editors, etc.) unusable?
>>
>> People have suggested this sort of thing before - such as "a ⊓ b" for
>> minimum and "a ⊔ b" for maximum, and failed on every point above.
>>
>> What are you bringing to the table that will change that?
>>
> 
> FWIW: min/max can make sense to be implemented via intrinsics, but this
> isn't quite the same.
> 
> Range-clamping as an intrinsic also makes sense (when the compiler can
> generate an efficient instruction sequence, but isn't smart enough to
> infer this operation from a blob of ternary operators or similar).
> 

Intrinsics have nothing to do with this.  I am not sure if there is an
exact definition of the term "intrinsic" - I would say it means
something that looks like a C function (or perhaps generic function,
like the <tgmath.h> stuff) but is implemented as a single assembly
instruction that matches the target cpu.  So if your target has a
"saturated addition" instruction, the compiler might have an "int
__SADD(int x, int y)" intrinsic that lets you use that without having to
write complicated C code to mimic the effect.

But if you mean a "function built into the compiler that it should
handle optimally", then you could easily have that.  gcc has several,
such as "__builtin_clz(unsigned int x)" to count the leading zeros in x.
 If the target has an instruction for doing that quickly, it gives a
single instruction - on other targets it might use a loop, a function
call, etc.

You could easily have "__builtin_max(a, b)" in the same way - or use
whatever convention suits your compiler.  But that is unrelated to
having additional symbols, characters or operators.

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


Thread

list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-13 03:16 -0800
  Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-13 04:56 -0800
    Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-13 05:16 -0800
  Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-13 15:43 +0100
    Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-13 09:55 -0800
      Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-13 11:05 -0800
      Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-13 20:29 +0100
      Re: list of chars to introduce in future c "Pascal J. Bourguignon" <pjb@informatimago.com> - 2019-02-13 20:33 +0100
        Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-13 12:08 -0800
      Re: list of chars to introduce in future c John Bode <jfbode1029@gmail.com> - 2019-02-13 12:02 -0800
        Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-13 12:16 -0800
          Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 09:34 +0100
            Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 02:04 -0800
              Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 02:08 -0800
              Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 11:28 +0100
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 02:38 -0800
                Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 14:54 +0100
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 06:39 -0800
                Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 16:26 +0100
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 02:49 -0800
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 02:59 -0800
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 03:10 -0800
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 03:34 -0800
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 05:25 -0800
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-15 13:54 +0000
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 06:07 -0800
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 06:10 -0800
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 06:14 -0800
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 06:18 -0800
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 06:22 -0800
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-15 14:24 +0000
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 06:32 -0800
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 06:39 -0800
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-15 14:47 +0000
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 07:32 -0800
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-15 15:56 +0000
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 08:18 -0800
                Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-15 17:10 +0100
                Re: list of chars to introduce in future c Keith Thompson <kst-u@mib.org> - 2019-02-14 12:20 -0800
                Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 21:32 +0100
                Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 13:52 -0800
              Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-14 02:31 -0800
    Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-13 12:48 -0600
      Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 09:45 +0100
        Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-14 04:06 -0600
          Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 11:39 +0100
            Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-14 14:34 +0000
              Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 16:31 +0100
                Re: list of chars to introduce in future c Robert Wessel <robertwessel2@yahoo.com> - 2019-02-14 14:39 -0600
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-14 23:48 +0000
                Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-15 09:20 +0100
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-15 11:09 +0000
                Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-15 17:25 +0100
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-15 16:46 +0000
                Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-15 18:05 +0100
                Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-17 14:45 -0600
                Re: list of chars to introduce in future c James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-02-15 10:51 -0800
            Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-14 13:59 -0600
              Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 21:36 +0100
                Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-15 00:47 -0600
                Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-15 09:26 +0100
                Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-15 14:15 -0600
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-16 01:36 +0000
                Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-16 01:25 -0600
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-16 12:17 +0000
                Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-16 15:08 -0600
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-16 23:10 +0000
                Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-17 00:56 -0600
                Re: list of chars to introduce in future c Bart <bc@freeuk.com> - 2019-02-17 17:30 +0000
                Re: list of chars to introduce in future c BGB <cr88192@hotmail.com> - 2019-02-17 16:02 -0600
          Re: list of chars to introduce in future c Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-02-14 13:49 +0000
    Re: list of chars to introduce in future c Philipp Klaus Krause <pkk@spth.de> - 2019-02-14 09:08 +0100
      Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 09:56 +0100
        Re: list of chars to introduce in future c Philipp Klaus Krause <pkk@spth.de> - 2019-02-14 11:06 +0100
          Re: list of chars to introduce in future c David Brown <david.brown@hesbynett.no> - 2019-02-14 15:01 +0100
  Re: list of chars to introduce in future c mark.bluemel@gmail.com - 2019-02-15 05:30 -0800
    Re: list of chars to introduce in future c fir <profesor.fir@gmail.com> - 2019-02-15 05:42 -0800
  Re: list of chars to introduce in future c Lynn McGuire <lynnmcguire5@gmail.com> - 2019-02-15 18:19 -0600

csiph-web