Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #388105
| From | Michael S <already5chosen@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: on allowing "int a" definition everywhere |
| Date | 2024-09-03 12:20 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <20240903122004.0000348e@yahoo.com> (permalink) |
| References | (8 earlier) <41520456e45d778ea26805f6f711a05757365bc3@i2pn2.org> <val7m1$3374n$1@dont-email.me> <vb3bkr$1r1t9$6@dont-email.me> <vb41ut$1gbbm$1@dont-email.me> <vb64ph$37k0o$1@dont-email.me> |
On Tue, 3 Sep 2024 04:54:10 -0000 (UTC)
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> On Mon, 2 Sep 2024 10:53:33 +0100, Bart wrote:
>
> > On 02/09/2024 04:32, Lawrence D'Oliveiro wrote:
> >> On Tue, 27 Aug 2024 19:59:13 +0100, Bart wrote:
> >>
> >>> void draw_line(f32 x, y, x2, y2; u32 colour) {
> >>>
> >>> - Allow shared types in parameter lists ...
> >>
> >> A bit easier if you flip it around and use Pascal-style syntax:
> >>
> >> procedure draw_line(x, y, x2, y2 : f32; colour : u32)
> >>
> >> See how much more natural that is?
> >
> > It becomes a bit less natural when you want to initialise a
> > variable at the same time, or want define a default value for a
> > parameter.
> >
> > Pascal didn't allow either of those.
>
> Ada does, with a very natural extension of the same syntax.
I didn't write Ada program for many years (although probably for less
years than you), but I regularly write VHDL, which syntax is heavily
inspired by Ada. My experience with it can in short be summarized as
"Bart is correct".
VHDL declaration + initialization syntax works not too badly as long as
you want to declare one signal (or constant or variable). It does not
work when you try to combine declaration of two signals of the same
type. It's so unnatural that I don't even know if it's at all allowed.
Now, Bart seems to think that ability to combine several declarations of
the same type is important. Here I disagree. At best, it's occasionally
nice.
> Even
> allows passing arguments by keyword, too.
>
By keyword? Do you mean call with named parameters association?
> Note that even C++ has now had to allow function return types to be
> specified at the end of the prototype instead of up front, because
> type interdependencies don’t work very well otherwise.
Likely happened after I stopped following.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-20 18:48 +0200
Re: on allowing "int a" definition everywhere Thiago Adams <thiago.adams@gmail.com> - 2024-08-20 14:03 -0300
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-20 19:18 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-20 19:21 +0200
Re: on allowing "int a" definition everywhere Thiago Adams <thiago.adams@gmail.com> - 2024-08-20 14:34 -0300
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-20 22:18 +0200
Re: on allowing "int a" definition everywhere Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> - 2024-08-21 04:42 +0000
Re: on allowing "int a" definition everywhere Thiago Adams <thiago.adams@gmail.com> - 2024-08-21 08:17 -0300
Re: on allowing "int a" definition everywhere Bart <bc@freeuk.com> - 2024-08-21 13:34 +0100
Re: on allowing "int a" definition everywhere Thiago Adams <thiago.adams@gmail.com> - 2024-08-21 10:01 -0300
Re: on allowing "int a" definition everywhere Michael S <already5chosen@yahoo.com> - 2024-08-21 16:54 +0300
Re: on allowing "int a" definition everywhere Thiago Adams <thiago.adams@gmail.com> - 2024-08-21 11:21 -0300
Re: on allowing "int a" definition everywhere Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> - 2024-08-22 08:40 +0000
Re: on allowing "int a" definition everywhere Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-22 02:21 -0700
Re: on allowing "int a" definition everywhere Ben Bacarisse <ben@bsb.me.uk> - 2024-08-22 11:29 +0100
Re: on allowing "int a" definition everywhere Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-22 11:12 -0700
Re: on allowing "int a" definition everywhere Kaz Kylheku <643-408-1753@kylheku.com> - 2024-08-22 18:37 +0000
Re: on allowing "int a" definition everywhere Ben Bacarisse <ben@bsb.me.uk> - 2024-08-23 00:39 +0100
Re: on allowing "int a" definition everywhere Bart <bc@freeuk.com> - 2024-08-22 11:00 +0100
Re: on allowing "int a" definition everywhere Thiago Adams <thiago.adams@gmail.com> - 2024-08-22 08:10 -0300
Re: on allowing "int a" definition everywhere Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> - 2024-08-22 17:06 +0000
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-23 12:47 +0200
Re: on allowing "int a" definition everywhere Bart <bc@freeuk.com> - 2024-08-23 12:25 +0100
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-23 13:32 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-23 17:57 +0200
Re: on allowing "int a" definition everywhere Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-21 03:30 +0000
Re: on allowing "int a" definition everywhere Ben Bacarisse <ben@bsb.me.uk> - 2024-08-21 09:19 +0100
Re: on allowing "int a" definition everywhere Ben Bacarisse <ben@bsb.me.uk> - 2024-08-21 10:11 +0100
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-25 12:40 +0200
Re: on allowing "int a" definition everywhere Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-27 06:52 +0000
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 10:46 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 11:03 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 11:08 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 11:47 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 11:52 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 13:56 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 20:04 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 20:44 +0200
Re: on allowing "int a" definition everywhere Bart <bc@freeuk.com> - 2024-08-27 19:59 +0100
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 21:36 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 22:02 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 23:42 +0200
Re: on allowing "int a" definition everywhere Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-02 03:32 +0000
Re: on allowing "int a" definition everywhere Bart <bc@freeuk.com> - 2024-09-02 10:53 +0100
Re: on allowing "int a" definition everywhere Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-03 04:54 +0000
Re: on allowing "int a" definition everywhere Kaz Kylheku <643-408-1753@kylheku.com> - 2024-09-03 06:12 +0000
Re: on allowing "int a" definition everywhere Michael S <already5chosen@yahoo.com> - 2024-09-03 12:20 +0300
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-27 21:09 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-29 09:24 +0200
Re: on allowing "int a" definition everywhere fir <fir@grunge.pl> - 2024-08-29 09:37 +0200
Re: on allowing "int a" definition everywhere Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-03 04:56 +0000
Re: on allowing "int a" definition everywhere Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> - 2024-08-27 12:28 +0000
Re: on allowing "int a" definition everywhere Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-08-27 18:45 -0700
Re: on allowing "int a" definition everywhere Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-27 19:23 -0700
Re: on allowing "int a" definition everywhere Ben Bacarisse <ben@bsb.me.uk> - 2024-08-28 15:28 +0100
Re: on allowing "int a" definition everywhere Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-08-28 08:37 -0700
Re: on allowing "int a" definition everywhere Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-08-28 08:22 -0700
Re: on allowing "int a" definition everywhere Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-28 13:06 -0700
Re: on allowing "int a" definition everywhere Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-08-28 09:31 -0700
Re: on allowing "int a" definition everywhere David Brown <david.brown@hesbynett.no> - 2024-08-28 19:39 +0200
Re: on allowing "int a" definition everywhere James Kuyper <jameskuyper@alumni.caltech.edu> - 2024-08-28 14:34 -0400
Re: on allowing "int a" definition everywhere Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-28 13:06 -0700
csiph-web