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


Groups > comp.lang.c > #167539

Re: Cake - C23 to C99 transpiler

From Bart <bc@freeuk.com>
Newsgroups comp.lang.c
Subject Re: Cake - C23 to C99 transpiler
Date 2022-09-07 21:03 +0100
Organization Aioe.org NNTP Server
Message-ID <tfate1$r6$1@gioia.aioe.org> (permalink)
References (8 earlier) <87leqv87t2.fsf@bsb.me.uk> <tfahhl$h2r$1@gioia.aioe.org> <87fsh386ze.fsf@bsb.me.uk> <tfanqb$1gk1$1@gioia.aioe.org> <8735d380ta.fsf@bsb.me.uk>

Show all headers | View raw


On 07/09/2022 20:02, Ben Bacarisse wrote:
> Bart <bc@freeuk.com> writes:
> 
>> On 07/09/2022 17:49, Ben Bacarisse wrote:
>>> Bart <bc@freeuk.com> writes:
>>>
>>>> On 07/09/2022 17:31, Ben Bacarisse wrote:
>>>>> Bart <bc@freeuk.com> writes:
>>>
>>>>>> Just supporting '$' anyway would be a one-line change in the tcc
>>>>>> source code (although that only fixed my copy of it when I tried it).
>>>>>
>>>>> Or a zero line change if you use that option.
>>>>
>>>> But all build instructions for every user for every project that
>>>> depends on '$' would forever more need to include
>>>> '-fdollars-in-identifiers'.  IMV that was the wrong choice.
>>> But you don't think using IDs with non-standard characters might also
>>> have been a poor choice?
>>
>> The dollar symbols come up when transpiling to C code from syntax that
>> uses $, for example, to represent fully names since C lacks
>> namespaces, or for special identifiers.
>>
>> There, $ was considered a better and more visible and obvious
>> indicator of a special identifier than underscore.
>>
>> Underscores suffer from poor visibility; consecutive underscore can
>> appear to run together depending on font; and they are also popular as
>> separators in user-identifiers, creating a bit more confusion.
> 
> So no, you consider it a good choose.  So good, in fact, that you are
> happy to exclude tcc from being used as the C compiler.  But adding a
> line to the documentation to say "add -fdollars-in-identifiers when
> using tcc" is too much.
> 

I supported Tcc but I needed to translate names using $ into something 
that is acceptable. That sort of worked, but gave less readable, longer, 
more unsatisfactory output.

The advantage is that it doesn't need to be mentioned in build docs:

  gcc linux:    gcc prog.c -oprog -lm -ldl
  tcc linux:    tcc prog.c -oprog -lm -ldl -fdollars-in-identifiers
  gcc windows:  gcc prog.c -oprog.exe
  tcc windows:  tcc prog.c -luser32 -fdollars-in-identifiers
  bcc windows:  bcc prog

It sort of sticks out doesn't it.

Also, gcc gets away with allowing $ by default; tcc generally copies gcc 
in terms of how a compiler is invoked, so this surprisingly goes against 
that.

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


Thread

Cake -  C23 to C99 transpiler Thiago Adams <thiago.adams@gmail.com> - 2022-08-18 18:44 -0700
  Re: Cake - C23 to C99 transpiler Blue-Maned_Hawk <bluemanedhawk@example.invalid> - 2022-09-06 02:48 -0400
    Re: Cake - C23 to C99 transpiler Thiago Adams <thiago.adams@gmail.com> - 2022-09-06 10:08 -0700
      Re: Cake - C23 to C99 transpiler Vir Campestris <vir.campestris@invalid.invalid> - 2022-09-07 12:27 +0100
        Re: Cake - C23 to C99 transpiler Thiago Adams <thiago.adams@gmail.com> - 2022-09-07 05:45 -0700
          Re: Cake - C23 to C99 transpiler Bart <bc@freeuk.com> - 2022-09-07 15:35 +0100
            Re: Cake - C23 to C99 transpiler Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-09-07 16:38 +0100
              Re: Cake - C23 to C99 transpiler Bart <bc@freeuk.com> - 2022-09-07 17:04 +0100
                Re: Cake - C23 to C99 transpiler Anton Shepelev <anton.txt@g{oogle}mail.com> - 2022-09-07 19:14 +0300
                Re: Cake - C23 to C99 transpiler Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-09-07 17:31 +0100
                Re: Cake - C23 to C99 transpiler Bart <bc@freeuk.com> - 2022-09-07 17:40 +0100
                Re: Cake - C23 to C99 transpiler Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-09-07 17:49 +0100
                Re: Cake - C23 to C99 transpiler Bart <bc@freeuk.com> - 2022-09-07 19:27 +0100
                Re: Cake - C23 to C99 transpiler Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-09-07 20:02 +0100
                Re: Cake - C23 to C99 transpiler Bart <bc@freeuk.com> - 2022-09-07 21:03 +0100
                Re: Cake - C23 to C99 transpiler Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-09-07 13:52 -0700
                Re: Cake - C23 to C99 transpiler Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-09-14 07:14 -0700
                Re: Cake - C23 to C99 transpiler Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-09-14 10:59 -0700
                Re: Cake - C23 to C99 transpiler Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-09-15 23:46 -0700
                Re: Cake - C23 to C99 transpiler David Brown <david.brown@hesbynett.no> - 2022-09-07 20:17 +0200
                Re: Cake - C23 to C99 transpiler Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-09-07 19:58 +0100
                Re: Cake - C23 to C99 transpiler Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-09-07 13:26 -0700
                Re: Cake - C23 to C99 transpiler Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-09-07 23:42 +0100
                Re: Cake - C23 to C99 transpiler Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-09-14 06:45 -0700
                Re: Cake - C23 to C99 transpiler Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-09-14 06:40 -0700
                Re: Cake - C23 to C99 transpiler Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-09-07 10:28 -0700
                Re: Cake - C23 to C99 transpiler David Brown <david.brown@hesbynett.no> - 2022-09-07 20:05 +0200
            Re: Cake - C23 to C99 transpiler Thiago Adams <thiago.adams@gmail.com> - 2022-09-07 15:28 -0700
              Re: Cake - C23 to C99 transpiler Bart <bc@freeuk.com> - 2022-09-08 00:51 +0100
                Re: Cake - C23 to C99 transpiler Thiago Adams <thiago.adams@gmail.com> - 2022-09-08 05:20 -0700
                Re: Cake - C23 to C99 transpiler Bart <bc@freeuk.com> - 2022-09-08 16:41 +0100
                Re: Cake - C23 to C99 transpiler scott@slp53.sl.home (Scott Lurndal) - 2022-09-08 16:43 +0000
                Re: Cake - C23 to C99 transpiler Bart <bc@freeuk.com> - 2022-09-08 19:23 +0100
                Re: Cake - C23 to C99 transpiler Thiago Adams <thiago.adams@gmail.com> - 2022-09-08 09:59 -0700

csiph-web