comp.lang.ada
 help / color / mirror / Atom feed
From: Ben Bacarisse <ben.usenet@bsb.me.uk>
Subject: Re: project euler 26
Date: Wed, 13 Sep 2023 13:24:44 +0100	[thread overview]
Message-ID: <87il8entv7.fsf@bsb.me.uk> (raw)
In-Reply-To: udp3b5$1f1i4$1@dont-email.me

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On 2023-09-11 18:13, Ben Bacarisse wrote:
>> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

>>> You should think about whether storing
>>> represents an issue, e.g. in terms of performance and/or space. If it does
>>> you should consider suitable implementation of storage that provides
>>> required overall performance of needed operations, like insertion, search,
>>> cleaning up etc.
>>
>> Yes, in Ada.  Since I can't use universal algorithms, it pays to decide
>> all this first because changes will be costly.
>
> There are no universally applicable algorithms.

This may be just a case where we are using terms to refer to different
things.  I find it hard to believe you don't know what I am referring to
since we've had a productive exchange examining an example in detail,
but I can agree it's not a good term.  I simply could not come up with a
better one on the fly.

So I'll re-phrase it avoiding the disputed term: simple fibledychops are
not available to the Ada programmer, but they are available in some
other languages.  I suspect you are not interested in what simple
fibledychops are, since their absence from Ada means they are not of any
importance (and may even be, in your opinion, detrimental to writing
good programs).  If you really want to know what a fibledychop is, I can
have a go at saying more about what they it, but would that be
worthwhile?  I think you are sure they are a bad idea already.

>>> My understanding was that you wanted to see how to use the Ada standard
>>> library containers with generics.
>>
>> Well that's what it turned out to be.  At first I did not know that
>> built-in types like arrays can't be covered in the same way.
>
> I know no language where primitive built-in types may have classes.

Haskell's type classes are very nice -- every type belongs to one or
more classes that determine the permitted operations.  And in some
languages there are essentially no "built-in" types.  In ML for example,
the interface to arrays is defined in ML so they can support a universal
set of operations shared with many other types, but they are usually
implemented by the run-time environment for speed.

>> What matters is what types the
>> language offers, and what the interfaces to those types are.
>
> That does not matter at all. Matters the type algebra by which programmer
> can create types suitable to model the problem space entities.

Yes, but...  First, almost every language comes with some predefined
types.  If the problem space needs fast indexed access to a set of
entities, we don't usually have to define our own arrays or vectors.
It's so often needed that we expect something to be provided, so what
types the language offers /does/ matter.  Secondly, the problem space
has two components -- data and actions on that data.  I suspect by
"problem space entities" you mean just the data because that what Ada
focuses on.  But programming languages can offer tool that help to model
the actions in the problem space as well.

-- 
Ben.

  reply	other threads:[~2023-09-13 12:24 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04  9:19 project euler 26 CSYH (QAQ)
2023-09-04 11:06 ` Niklas Holsti
2023-09-04 12:39   ` Dmitry A. Kazakov
2023-09-04 16:01     ` Ben Bacarisse
2023-09-04 19:20       ` Dmitry A. Kazakov
2023-09-04 20:18         ` Ben Bacarisse
2023-09-04 21:00           ` Dmitry A. Kazakov
2023-09-04 23:16             ` Ben Bacarisse
2023-09-05  7:23               ` Dmitry A. Kazakov
2023-09-05 15:18                 ` Ben Bacarisse
2023-09-05 17:08                   ` Dmitry A. Kazakov
2023-09-06  1:10                     ` Ben Bacarisse
2023-09-06  7:06                       ` Dmitry A. Kazakov
2023-09-06 15:16                         ` Ben Bacarisse
2023-09-06 15:54                           ` Dmitry A. Kazakov
2023-09-06 23:32                             ` Ben Bacarisse
2023-09-07  9:02                               ` Dmitry A. Kazakov
2023-09-08  1:32                                 ` Ben Bacarisse
2023-09-08  7:23                                   ` Dmitry A. Kazakov
2023-09-09  0:25                                     ` Ben Bacarisse
2023-09-09  9:32                                       ` Dmitry A. Kazakov
2023-09-10  1:20                                         ` Ben Bacarisse
2023-09-10  8:46                                           ` Dmitry A. Kazakov
2023-09-10 19:22                                             ` Ben Bacarisse
2023-09-11  6:53                                               ` Dmitry A. Kazakov
2023-09-11 16:13                                                 ` Ben Bacarisse
2023-09-12  7:17                                                   ` Dmitry A. Kazakov
2023-09-13 12:24                                                     ` Ben Bacarisse [this message]
2023-09-14  6:33                                                       ` Dmitry A. Kazakov
2023-09-14 14:30                                                         ` Ben Bacarisse
2023-09-08  6:09                               ` G.B.
2023-09-08 21:02                                 ` Ben Bacarisse
2023-09-09  8:13                                   ` G.B.
2023-09-09 21:04                                     ` Ben Bacarisse
2023-09-10  9:11                                     ` Dmitry A. Kazakov
2023-09-05 17:35                 ` moi
2023-09-04 14:23 ` Dmitry A. Kazakov
2023-09-07  7:31 ` Francesc Rocher
2023-09-15  9:07   ` CSYH (QAQ)
2023-09-19  7:59     ` comp.lang.ada
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox