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


Groups > comp.lang.c > #109250

Re: Approach to create/use containers in C

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: Approach to create/use containers in C
Date 2017-05-04 20:03 +0100
Organization A noiseless patient Spider
Message-ID <878tmce979.fsf@bsb.me.uk> (permalink)
References <e83257d9-b73b-4e33-bdab-0703c6dda5be@googlegroups.com> <oefelo$ikd$1@dont-email.me> <182ac629-400f-4c07-93dd-d0822ada4221@googlegroups.com> <e1712519-119c-4985-a1b4-bee832a60c8a@googlegroups.com>

Show all headers | View raw


Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> On Thursday, May 4, 2017 at 3:50:54 PM UTC+1, Thiago Adams wrote:
>> 
>> I think the bad point of this solution is performance because 
>> it is more dynamic. Also less type check.
>>
> You can't type check, but people make far too much fuss about "type safety",
> because it happens to be a programming error that is easy for the compiler
> to catch.

That's very much a C (and C-like) language perspective.  Even for some
relatively natural type systems, type checking can be undecidable and it
is often NP-complete.  But you are right that it is often made easy to
check.

Of course that's, in part, what makes it something that is over fussed
about in that the fuss is more justifiable, the less easy the
type-checking is.  At the far end of that spectrum would be a type
system in which type-checking the program is equivalent to proving the
program semantically correct.

> In Javascript you don't have it, because "duck typing" is easier
> for the interpreter to implement. And a bug that involves reinterpreting bits
> as the wrong type will usually come out very early.

JavaScript (AKA EcmaScript) does have type checking -- just very little
of it.

<snip>
-- 
Ben.

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


Thread

Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-04 06:13 -0700
  Re: Approach to create/use containers in C Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-04 09:27 -0400
  Re: Approach to create/use containers in C GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-05-04 15:26 +0200
  Re: Approach to create/use containers in C GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-05-04 15:29 +0200
    Re: Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-04 06:40 -0700
      Re: Approach to create/use containers in C GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-05-04 15:49 +0200
      Re: Approach to create/use containers in C bartc <bc@freeuk.com> - 2017-05-04 16:38 +0100
        Re: Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-04 09:59 -0700
          Re: Approach to create/use containers in C bartc <bc@freeuk.com> - 2017-05-04 18:45 +0100
            Re: Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-05 10:22 -0700
  Re: Approach to create/use containers in C Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2017-05-04 06:33 -0700
    Re: Approach to create/use containers in C GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-05-04 15:40 +0200
      Re: Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-04 06:54 -0700
        Re: Approach to create/use containers in C GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-05-04 16:06 +0200
  Re: Approach to create/use containers in C Richard Heathfield <rjh@cpax.org.uk> - 2017-05-04 15:46 +0100
    Re: Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-04 07:50 -0700
      Re: Approach to create/use containers in C Richard Heathfield <rjh@cpax.org.uk> - 2017-05-04 16:10 +0100
      Re: Approach to create/use containers in C Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2017-05-04 08:18 -0700
        Re: Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-04 09:48 -0700
          Re: Approach to create/use containers in C Richard Heathfield <rjh@cpax.org.uk> - 2017-05-04 17:55 +0100
          Re: Approach to create/use containers in C Ike Naar <ike@iceland.freeshell.org> - 2017-05-04 22:04 +0000
        Re: Approach to create/use containers in C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-04 20:03 +0100
          Re: Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-04 12:25 -0700
            Re: Approach to create/use containers in C Robert Wessel <robertwessel2@yahoo.com> - 2017-05-04 15:03 -0500
              Re: Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-04 13:09 -0700
        Re: Approach to create/use containers in C Tim Rentsch <txr@alumni.caltech.edu> - 2017-05-05 01:34 -0700
      Re: Approach to create/use containers in C GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-05-04 17:17 +0200
    Re: Approach to create/use containers in C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-05-04 19:36 +0100
  Re: Approach to create/use containers in C Robert Wessel <robertwessel2@yahoo.com> - 2017-05-04 12:09 -0500
    Re: Approach to create/use containers in C Robert Wessel <robertwessel2@yahoo.com> - 2017-05-04 12:17 -0500
      Re: Approach to create/use containers in C Thiago Adams <thiago.adams@gmail.com> - 2017-05-04 10:30 -0700
        Re: Approach to create/use containers in C Ian Collins <ian-news@hotmail.com> - 2017-05-05 07:50 +1200
      Re: Approach to create/use containers in C Keith Thompson <kst-u@mib.org> - 2017-05-04 11:29 -0700
      Re: Approach to create/use containers in C Andreas Perstinger <andipersti@gmail.com> - 2017-05-04 18:34 +0000
        Re: Approach to create/use containers in C Robert Wessel <robertwessel2@yahoo.com> - 2017-05-04 15:07 -0500
  Re: Approach to create/use containers in C Doug Weiman <no@nyet.net> - 2017-05-04 21:19 +0000
    Re: Approach to create/use containers in C Keith Thompson <kst-u@mib.org> - 2017-05-04 14:41 -0700
      Re: Approach to create/use containers in C Doug Weiman <no@nyet.net> - 2017-05-04 22:30 +0000
  Re: Approach to create/use containers in C "A. Bolmarcich" <aggedor@earl-grey.cloud9.net> - 2017-05-04 21:47 +0000
  Re: Approach to create/use containers in C luser droog <luser.droog@gmail.com> - 2017-05-05 00:43 -0700

csiph-web