Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #126622
| Subject | Re: C2 Aims to Modernize the C Language |
|---|---|
| Newsgroups | comp.lang.c |
| References | (10 earlier) <p5s881$m5u$1@dont-email.me> <egigC.4$w26.3@fx47.am4> <p5sd29$s9v$1@dont-email.me> <mZjgC.539$gS1.348@fx26.am4> <p5t1fn$s35$1@dont-email.me> |
| From | bartc <bc@freeuk.com> |
| Message-ID | <tmogC.3577$GL6.562@fx05.am4> (permalink) |
| Organization | virginmedia.com |
| Date | 2018-02-12 22:15 +0000 |
On 12/02/2018 21:37, David Brown wrote:
> On 12/02/18 18:16, bartc wrote:
>> The 32-bit DWORD here is misaligned.
>
> And whose fault is that? C's fault - or Microsoft's?
I'm talking about APIs specified in C. They are necessarily outside the
language, but the language allows that ambiguity. If padding and
alignment don't need to be considered then the DWORD is at offset +0002
and it would be correct.
(And actually, on x86, alignment is not crucial. What's crucial is
creating an exact duplicate of that struct in an different language.)
> Yes, you made an amazing confusion out of clock_t.
Remind me again what the type was. How hard is it to just stipulate it
as int32 or int64 and be done with it. And all those typedefs and macros
were real.
> Whose fault is it that there are different kinds of calling conventions
> in the Windows world?
Again, this is what you get in APIs. C is not as ideal a universal
format for specifying interfaces as you seem to think.
> I have never looked at one of MSVC's header files, and /I/ can make a
> solid guess about most of these attributes. I can also make a good
> guess where to find out more details - MS's developer websites, or just
> use google. How is it /possible/ to be so wilfully, stubbornly and
> determinedly ignorant as you are?
Listen: YOU use C. YOU can just use:
#include <windows.h>
and be done with it. It's all done for you (by those 500,000 lines of
headers).
When you've written a major application around Win32 API in a C
equivalent language without benefit of windows.h, then see if you still
think it's easy, and everyone else who disagrees is ignorant.
Oh, and try doing it without the internet.
>> This from another MS header; what are those _dev_t and _ino_t types:
>
> Look them up.
We've been through this. It's a hunting exercise trawling sub-headers
and subdirectories. Or you have to create a dummy program, and compile
with -E to get preprocessed output, and then trawl through /that/ to
find out what they are.
That should not be necessary. (And when we discussed it last time, I
said it should be possible to use such a library without needing a C
compiler. So the -E option is out. And it should not be necessary to
dive deep into system headers either. The docs should stand on their own.)
> If you don't understand the point of typedefs, I'd recommend going back
> to a beginners course in C programming.
YOU seem incapable of understanding when typedefs are overused.
The first six members of a struct are just simple ints (some mix of 16
and 32 bits, I don't recall), and there are FIVE different typedefs?
Come on!
You probably think this is good coding:
typedef struct {
_dayno_t day;
_monthno_t month;
_yearno_t year;
} rdate;
Can you even make a guess as to how many bytes such a struct has? Are
those even integers?
Most people would prefer this:
typedef struct {
int8_t day;
int8_t month;
int16_t year;
} rdate;
Total size, 32 bits. But I guess you're too ignorant to understand why
something like this is better.
>> I've been battling with this stuff since the earlier nineties (when I
>> first started using C functions).
>
> You have been battling with it all right - you have never spent five
> minutes trying to understand it. You declared it to be wrong in the
> early nineties when you first looked at it, and have spend the next
> three decades trying to justify that conclusion to yourself.
Have you ever spent five minutes not doing this stuff with C, C++ or
Python, where everyone else has already done all the hard work? Just you
and the library, but no ready-made headers, interface files or bindings
for your language.
--
bartc
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: C2 Aims to Modernize the C Language David Kleinecke <dkleinecke@gmail.com> - 2018-02-10 12:41 -0800
Re: C2 Aims to Modernize the C Language Chad <cdalten@gmail.com> - 2018-02-10 13:38 -0800
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-11 00:32 +0100
Re: C2 Aims to Modernize the C Language Thiago Adams <thiago.adams@gmail.com> - 2018-02-10 17:23 -0800
Re: C2 Aims to Modernize the C Language Anton Shepelev <anton.txt@gmail.com> - 2018-02-11 13:53 +0300
Re: C2 Aims to Modernize the C Language Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-02-11 13:26 +0000
Re: C2 Aims to Modernize the C Language Thiago Adams <thiago.adams@gmail.com> - 2018-02-11 13:04 -0800
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-11 01:34 +0000
Re: C2 Aims to Modernize the C Language Thiago Adams <thiago.adams@gmail.com> - 2018-02-10 17:42 -0800
Re: C2 Aims to Modernize the C Language "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-02-10 17:50 -0800
Re: C2 Aims to Modernize the C Language fir <profesor.fir@gmail.com> - 2018-02-14 11:54 -0800
Re: C2 Aims to Modernize the C Language "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-02-14 12:14 -0800
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-11 04:48 +0100
Re: C2 Aims to Modernize the C Language Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2018-02-10 22:35 -0700
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-11 13:25 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-11 11:18 +0000
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-11 21:57 +0000
Re: C2 Aims to Modernize the C Language Ian Collins <ian-news@hotmail.com> - 2018-02-12 14:10 +1300
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 11:11 +0000
Re: C2 Aims to Modernize the C Language Reinhardt Behm <rbehm@hushmail.com> - 2018-02-12 20:33 +0800
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 13:43 +0000
Re: C2 Aims to Modernize the C Language Thiago Adams <thiago.adams@gmail.com> - 2018-02-12 06:05 -0800
Re: C2 Aims to Modernize the C Language Ian Collins <ian-news@hotmail.com> - 2018-02-13 07:13 +1300
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-13 01:17 +0000
Re: C2 Aims to Modernize the C Language David Brown <david.brown@hesbynett.no> - 2018-02-13 09:55 +0100
Re: C2 Aims to Modernize the C Language BGB <cr88192@hotmail.com> - 2018-02-13 12:28 -0600
Re: C2 Aims to Modernize the C Language Ian Collins <ian-news@hotmail.com> - 2018-02-14 11:36 +1300
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-14 00:59 +0000
Re: C2 Aims to Modernize the C Language Ian Collins <ian-news@hotmail.com> - 2018-02-14 15:19 +1300
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-14 14:07 +0000
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-03-06 15:46 +0000
Re: C2 Aims to Modernize the C Language BGB <cr88192@hotmail.com> - 2018-02-13 20:31 -0600
Re: C2 Aims to Modernize the C Language Ian Collins <ian-news@hotmail.com> - 2018-02-14 15:42 +1300
Re: C2 Aims to Modernize the C Language BGB <cr88192@hotmail.com> - 2018-02-14 01:13 -0600
Re: C2 Aims to Modernize the C Language Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-02-21 15:13 +0000
Re: C2 Aims to Modernize the C Language supercat@casperkitty.com - 2018-02-21 08:43 -0800
Re: C2 Aims to Modernize the C Language Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-02-21 19:21 +0000
Re: C2 Aims to Modernize the C Language Robert Wessel <robertwessel2@yahoo.com> - 2018-02-21 12:25 -0600
Re: C2 Aims to Modernize the C Language Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-02-21 19:28 +0000
Re: C2 Aims to Modernize the C Language Robert Wessel <robertwessel2@yahoo.com> - 2018-02-21 18:29 -0600
Re: C2 Aims to Modernize the C Language Ian Collins <ian-news@hotmail.com> - 2018-02-22 08:33 +1300
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-14 14:48 +0000
Re: C2 Aims to Modernize the C Language BGB <cr88192@hotmail.com> - 2018-02-14 11:54 -0600
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-13 20:41 +0000
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-12 00:00 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 00:59 +0000
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-12 12:29 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 12:18 +0000
Re: C2 Aims to Modernize the C Language David Brown <david.brown@hesbynett.no> - 2018-02-12 15:27 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 15:19 +0000
Re: C2 Aims to Modernize the C Language David Brown <david.brown@hesbynett.no> - 2018-02-12 16:49 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 17:16 +0000
Re: C2 Aims to Modernize the C Language Ian Collins <ian-news@hotmail.com> - 2018-02-13 07:30 +1300
Re: C2 Aims to Modernize the C Language David Brown <david.brown@hesbynett.no> - 2018-02-12 22:37 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 22:15 +0000
Re: C2 Aims to Modernize the C Language Ian Collins <ian-news@hotmail.com> - 2018-02-13 17:05 +1300
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-13 11:11 +0000
Re: C2 Aims to Modernize the C Language David Brown <david.brown@hesbynett.no> - 2018-02-13 10:32 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-13 11:10 +0000
Re: C2 Aims to Modernize the C Language gordonb.5itdn@burditt.org (Gordon Burditt) - 2018-02-14 12:57 -0600
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-14 20:29 +0000
Re: C2 Aims to Modernize the C Language gordonb.nrdl0@burditt.org (Gordon Burditt) - 2018-02-14 19:22 -0600
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-15 14:59 +0000
Re: C2 Aims to Modernize the C Language already5chosen@yahoo.com - 2018-02-13 04:00 -0800
Re: C2 Aims to Modernize the C Language David Brown <david.brown@hesbynett.no> - 2018-02-13 14:46 +0100
Re: C2 Aims to Modernize the C Language already5chosen@yahoo.com - 2018-02-13 08:49 -0800
Re: C2 Aims to Modernize the C Language Thiago Adams <thiago.adams@gmail.com> - 2018-02-13 09:52 -0800
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-13 13:47 +0100
Re: C2 Aims to Modernize the C Language already5chosen@yahoo.com - 2018-02-13 05:11 -0800
Re: C2 Aims to Modernize the C Language David Brown <david.brown@hesbynett.no> - 2018-02-13 14:49 +0100
Re: C2 Aims to Modernize the C Language "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2018-02-13 21:52 +0800
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-13 14:45 +0000
Re: C2 Aims to Modernize the C Language Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-02-13 07:45 -0800
Re: C2 Aims to Modernize the C Language Chad <cdalten@gmail.com> - 2018-02-13 05:35 -0800
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-13 13:21 +0000
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-13 13:24 +0000
Re: C2 Aims to Modernize the C Language Egor <egor@ruby.local> - 2018-02-13 13:14 +0200
Re: C2 Aims to Modernize the C Language already5chosen@yahoo.com - 2018-02-13 04:38 -0800
Re: C2 Aims to Modernize the C Language Egor <egor@ruby.local> - 2018-02-14 13:25 +0200
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-13 13:39 +0000
Re: C2 Aims to Modernize the C Language Egor <egor@ruby.local> - 2018-02-14 13:42 +0200
Re: C2 Aims to Modernize the C Language supercat@casperkitty.com - 2018-02-15 13:17 -0800
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-11 04:41 +0100
Re: C2 Aims to Modernize the C Language Manfred <noname@invalid.add> - 2018-02-12 17:25 +0100
Re: C2 Aims to Modernize the C Language Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-12 17:28 +0000
Re: C2 Aims to Modernize the C Language Manfred <noname@invalid.add> - 2018-02-12 21:01 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 17:51 +0000
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-12 19:28 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 20:02 +0000
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-12 23:32 +0100
Re: C2 Aims to Modernize the C Language David Brown <david.brown@hesbynett.no> - 2018-02-13 10:42 +0100
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-13 13:26 +0100
Re: C2 Aims to Modernize the C Language Richard Damon <Richard@Damon-Family.org> - 2018-02-13 08:06 -0500
Re: C2 Aims to Modernize the C Language Manfred <noname@invalid.add> - 2018-02-13 15:16 +0100
Re: C2 Aims to Modernize the C Language David Brown <david.brown@hesbynett.no> - 2018-02-13 14:53 +0100
Re: C2 Aims to Modernize the C Language BGB <cr88192@hotmail.com> - 2018-02-13 15:22 -0600
Re: C2 Aims to Modernize the C Language Keith Thompson <kst-u@mib.org> - 2018-02-12 12:26 -0800
Re: C2 Aims to Modernize the C Language GOTHIER Nathan <nathan.gothier@gmail.com> - 2018-02-12 23:45 +0100
Re: C2 Aims to Modernize the C Language "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-02-12 15:52 -0800
Re: C2 Aims to Modernize the C Language Chad <cdalten@gmail.com> - 2018-02-12 17:13 -0800
Re: C2 Aims to Modernize the C Language Manfred <noname@invalid.add> - 2018-02-12 21:15 +0100
Re: C2 Aims to Modernize the C Language bartc <bc@freeuk.com> - 2018-02-12 21:42 +0000
Re: C2 Aims to Modernize the C Language Manfred <noname@invalid.add> - 2018-02-12 23:21 +0100
csiph-web