comp.lang.ada
 help / color / mirror / Atom feed
From: Paul Rubin <no.email@nospam.invalid>
Subject: Re: If not Ada, what else...
Date: Fri, 10 Jul 2015 19:31:06 -0700
Date: 2015-07-10T19:31:06-07:00	[thread overview]
Message-ID: <87oajj4e8l.fsf@jester.gateway.sonic.net> (raw)
In-Reply-To: 2215b44f-8a89-47c6-a4c4-52b74d2dac45@googlegroups.com

David Botton <david@botton.com> writes:
>> I was aware of SPARK before that, when it was a separate expensive tool
> So now an expensive vendor tool is still an expensive vendor tool

But now there's a free version of SPARK, a big change.

> We are talking about Ada not SPARK. If you like SPARK and it fits your
> needs great.

Well, I'm thinking of SPARK as a component of Ada-2012.  Maybe that's
not exactly right but there's some conceptual sense to it.

> So in C++ you can create new incompatible types with various ranges,
> use them for array indexes, true enums?

I'm no C++ expert but I believe it has real enums (i.e. typed), unlike C
enums.  And since you can overload the [] operator and use whatever you
want as indexes, making incompatible range types and using them as
indexes is straightforward though a bit cumbersome.  It wouldn't
surprise me if there's a package for it (using templates) already.

> That is what you don't understand, Ada is about compile time checks
> and that comes with contacts. Contracts on the types, contracts on the
> interfaces.

Historically AFAIK range types in Ada were not statically checked.
Checking them is very complicated and can be partly automated these days
with SMT solvers, but in general you'd need proof assistants and lots of
manual effort.  Are we talking about the same thing?

> Well, once upon a time Ada compilers were certified. I don't believe
> AdaCore does that anymore.

There was some federal agency that did it, I thought.  It was eventually
shut down after it had served its purpose, which was getting
standardization to really mean something.

> And if you use Ada long enough you learn to use the Stack most of the
> time to accomplish the same thing and you don't get sloppy which tends
> to happen to GC dependent programmers.

This is no different from C++.  The usefulness of GC depends on what
kinds of programs you're writing, so it's true, lots of code doesn't
need it, but for some, it's great.  C++ programs these days use
reference counted smart pointers, which are a poor man's GC.

> Ada does have a GC in some implementations as I pointed out. You are
> having trouble separating language from runtime environment. A GC in
> Ada or D is something you can choose to use.

Yes, I'm just not sure why to use a GC in Ada.  If you can afford a GC's
overhead and accept the non-determinism it creates, why use Ada in the
first place, instead of something like Haskell?  I guess there might be
some situations.  But I mostly find Ada attractive for exactly the
problems in which GC is unattractive or unfeasible.

> BTW, I've never had the need but there are ways to use a GC even the
> current GNAT's on most platforms.

That's interesting and I'll look into it.

>> GC'd languages that support functional-programming idioms
> You can use D in that environment, although Ada is better at it. Repl
> clauses, etc. are also pluses.

Not sure what a repl clause is.  Ada doesn't support FP style very well,
which is fine because that was never its goal.

>> I consider [C and C++] ... to be niche languages
> No still general purpose. You need to look at the language itself to
> make that determination not just how it is being used currently.

I'd say you have to look at the problems people are trying to solve, and
the technology available for solving them.  These days most programming
is done on very powerful, underutilized cpus with tons of memory
compared to the problem, so GC'd languages are generally the most
productive approach for those applications.

> C and C++ are still heavily used in general use cases, from embedded
> to UI and Game Dev, etc.

Embedded is a niche, UI should be done in other languages these days,
and game dev is somewhat special because it's often realtime.  One of
the most successful games (Minecraft) was written in Java though, lots
of games use a combination of C++ and Lua, and there's this:
https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/sweeny.pdf

> If anything C#, Python, Java are more niche, just their niche is where
> the vast majority of programs and programmers are. You would be a fool
> to use any of the three in anything critical (safety, time, etc.)

If the vast majority of programs and programmers are in a particular
place, then that place is by definition mainstream and not a niche ;-).
Only a few programmers are doing safety or time critical things, so THAT
is a niche.  But, an awful lot of mainstream programs and programmers
now are doing internet applications, which brings security concerns that
make unsafe languages like C problematic.  Ada might be ok if you leave
all the runtime checks enabled, though there's still a productivity
issue.  There's also no implementation that I know of with lightweight
multitasking like Go, so that cramps you if you want to run
high-concurrency servers.

> Even Haskell, OCAML, etc. are fairly niche. All the scripting
> languages are niche.

Scripting is mainstream in that it's how most stuff is being written.
Haskell and Ocaml are niche because while they have fairly broad
applicability, there's not much of a userbase and it's not clear that
Haskell has significant advantages for the typical CRUD app (Ocaml might
make more sense).  Or if you want something really "out there",
http://www.impredicative.com/ur/ might be of interest.

> Ada, D, C, C++ are all geared for full range dev across the entire
> spectrum. Ada due to external issues in tool and compiler availability
> is the more limited currently, but almost as broad.

Just because you CAN write something in Ada, D, C, C++, Forth, Assembler
etc. (those languages can all do pretty much anything) doesn't mean that
there's not a more effective alternative in a particular area.  What I'd
say is those languages are most effective in areas that are (as of 2015)
somewhat specialized in the way I see things.  Full range devs should be
able to use them when the task calls for it, but most tasks these days
probably don't.

  parent reply	other threads:[~2015-07-11  2:31 UTC|newest]

Thread overview: 168+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 10:39 If not Ada, what else Alex R. Mosteo
2011-04-20 10:51 ` Ludovic Brenta
2011-04-21  8:47   ` Alex R. Mosteo
2011-04-20 11:53 ` Maciej Sobczak
2011-04-21  8:46   ` Alex R. Mosteo
2011-04-23  2:08     ` Peter C. Chapin
2011-04-21 17:19 ` Robert Matthews
2011-04-21 19:02   ` Georg Bauhaus
2011-04-21 19:25   ` Florian Weimer
2011-04-22 15:50     ` Robert Matthews
2011-04-22 17:49       ` Brad Cantrell
2011-04-23  2:20         ` Peter C. Chapin
2011-04-23  9:55           ` Georg Bauhaus
2011-04-23 11:17             ` Peter C. Chapin
2011-04-22 21:39       ` Florian Weimer
2011-04-23  2:26         ` Peter C. Chapin
2011-04-23  9:52 ` björn lundin
2011-04-23 11:50 ` Piotr Trojanek
2011-04-23 12:23   ` Dmitry A. Kazakov
2011-04-23 14:30     ` Georg Bauhaus
2011-04-23 15:04       ` Dmitry A. Kazakov
2011-04-23 16:16     ` Piotr Trojanek
2011-04-28 12:55   ` C++/cmake project, injecting Ada... (was Re: If not Ada, what else...) Alex R. Mosteo
2011-04-28 16:34     ` C++/cmake project, injecting Ada Ludovic Brenta
2011-04-29  8:17       ` Alex R. Mosteo
2011-04-29 12:45         ` stefan-lucks
2015-07-02 10:44         ` Alejandro R. Mosteo
2011-05-28 17:33     ` C++/cmake project, injecting Ada... (was Re: If not Ada, what else...) Dirk Heinrichs
2015-07-03 19:21 ` If not Ada, what else luvhed
2015-07-03 20:50   ` Paul Rubin
2015-07-04  8:19 ` Rod Kay
2015-07-08 18:11 ` jm.tarrasa
2015-07-08 20:33   ` Anh Vo
2015-07-09  6:36     ` jm.tarrasa
2015-07-08 22:15   ` David Botton
2015-07-09  7:28     ` jm.tarrasa
2015-07-09  9:54       ` G.B.
2015-07-09 12:57       ` Dennis Lee Bieber
2015-07-09 18:25       ` David Botton
2015-07-09 21:15         ` Bob Duff
2015-07-09 22:23           ` David Botton
2015-07-09 22:39             ` Paul Rubin
2015-07-10  0:20               ` David Botton
2015-07-10  4:26                 ` Paul Rubin
2015-07-10 15:01                   ` David Botton
2015-07-10 16:07                     ` David Botton
2015-07-10 17:39                       ` Bob Duff
2015-07-10 18:22                     ` Paul Rubin
2015-07-10 19:10                       ` David Botton
2015-07-10 19:43                         ` Patrick Noffke
2015-07-11 10:46                           ` Brian Drummond
2015-07-11 10:59                             ` Björn Lundin
2015-07-11 13:41                               ` Georg Bauhaus
2015-07-11 14:11                                 ` Björn Lundin
2015-07-13 14:02                             ` Patrick Noffke
2015-07-13 14:16                               ` David Botton
2015-07-13 14:54                                 ` Maciej Sobczak
2015-07-16 20:19                                 ` Serge Robyns
2015-07-17  1:50                                   ` David Botton
2015-07-17 17:07                                     ` Anh Vo
2015-07-17 21:28                                       ` Serge Robyns
2015-07-17 22:53                                         ` Anh Vo
2015-07-19 14:31                                       ` David Botton
2015-07-19 16:20                                         ` Paul Rubin
2015-07-19 20:55                                           ` Jeffrey R. Carter
2015-07-19 21:15                                             ` Paul Rubin
2015-07-20 16:08                                               ` Tero Koskinen
2015-07-20 17:31                                                 ` Paul Rubin
2015-07-21  1:16                                                   ` Dennis Lee Bieber
2015-07-21  3:09                                                     ` Shark8
2015-07-21 12:46                                                       ` Dennis Lee Bieber
2015-07-21  5:43                                                   ` J-P. Rosen
2015-07-21 12:47                                                     ` Dennis Lee Bieber
2015-07-21 12:55                                                       ` J-P. Rosen
2015-07-19 22:38                                           ` David Botton
2015-07-21  6:30                                     ` Gour
2015-07-21 16:24                                       ` David Botton
2015-07-21 17:29                                         ` Niklas Holsti
2015-07-21 18:51                                           ` Simon Wright
2015-07-21 19:36                                             ` David Botton
2015-07-22  8:44                                               ` Pascal Obry
2015-07-22 12:00                                               ` Jean François Martinez
2015-07-27 22:59                                                 ` Randy Brukardt
2015-07-28  7:00                                                   ` Georg Bauhaus
2015-07-28  7:22                                                     ` Paul Rubin
2015-07-28 10:36                                                       ` darkestkhan
2015-07-28 10:58                                                       ` G.B.
2015-07-28 20:33                                                       ` Randy Brukardt
2015-07-28 10:40                                                   ` darkestkhan
2015-07-29  7:30                                                     ` Jacob Sparre Andersen
2015-07-29  8:55                                                       ` Simon Wright
2015-07-29 12:38                                                   ` EGarrulo
2015-07-29 13:06                                                     ` EGarrulo
2015-07-29 15:41                                                     ` Paul Rubin
2015-07-29 17:01                                                       ` Björn Lundin
2015-07-29 18:27                                                         ` Paul Rubin
2015-07-29 18:52                                                           ` Björn Lundin
2015-07-29 22:18                                                             ` Paul Rubin
2015-07-30  6:23                                                               ` Dmitry A. Kazakov
2015-07-30 16:48                                                                 ` David Botton
2015-07-30 18:10                                                               ` Randy Brukardt
2015-07-29 19:18                                                           ` Georg Bauhaus
2015-07-29 19:42                                                             ` Randy Brukardt
2015-07-30  4:54                                                               ` Paul Rubin
2015-07-30  6:15                                                                 ` Niklas Holsti
2015-07-30  6:34                                                                 ` Dmitry A. Kazakov
2015-07-30  6:47                                                                   ` Paul Rubin
2015-07-30  7:20                                                                     ` Dmitry A. Kazakov
2015-07-30 23:13                                                                       ` Paul Rubin
2015-07-29 17:07                                                       ` Stefan.Lucks
2015-07-29 17:47                                                         ` Paul Rubin
2015-08-21 23:03                                                           ` Waldek Hebisch
2015-08-22  3:24                                                             ` Paul Rubin
2015-08-23 16:26                                                               ` Waldek Hebisch
2015-08-23 17:18                                                                 ` Jeffrey R. Carter
2015-08-23 17:31                                                                   ` Waldek Hebisch
2015-08-23 19:32                                                                     ` Jeffrey R. Carter
2015-08-23 23:01                                                               ` Waldek Hebisch
2015-07-29 19:32                                                       ` Georg Bauhaus
2015-07-30  5:17                                                         ` Paul Rubin
2015-07-30  7:38                                                           ` Georg Bauhaus
2015-07-30 18:26                                                             ` Paul Rubin
2015-07-30 18:37                                                               ` Paul Rubin
2015-07-31  7:14                                                                 ` Georg Bauhaus
2015-07-30 10:59                                                     ` darkestkhan
2015-08-19 22:19                                                 ` rriehle
2015-08-19 22:58                                                   ` Anh Vo
2015-08-19 23:32                                                     ` rriehle
2015-08-20  1:08                                                       ` Peter Chapin
2015-08-21 15:14                                                       ` Anh Vo
2015-08-21 16:07                                                         ` Anh Vo
2015-08-21 17:17                                                           ` Patrick Noffke
2015-07-21 19:51                                             ` Dmitry A. Kazakov
2015-07-21 21:06                                               ` Simon Wright
2015-07-21 21:51                                                 ` Dmitry A. Kazakov
2015-07-21 22:55                                                   ` Jeffrey R. Carter
2015-07-22  7:26                                                     ` Dmitry A. Kazakov
2015-07-22  9:05                                                       ` Mart van de Wege
2015-07-22 10:27                                                         ` Dmitry A. Kazakov
2015-07-22  7:01                                                   ` Simon Wright
2015-07-22  7:35                                                     ` Dmitry A. Kazakov
2015-07-27 23:02                                                       ` Randy Brukardt
2015-07-27 22:44                                                 ` Randy Brukardt
2015-07-28  7:30                                                   ` Simon Wright
2015-07-28 20:39                                                     ` Randy Brukardt
2015-07-29  7:12                                                       ` Simon Wright
2015-07-29 11:11                                                         ` vincent.diemunsch
2015-07-29 19:31                                                         ` Randy Brukardt
2015-07-22 12:53                                               ` Vincent
2015-07-22 13:59                                                 ` Dmitry A. Kazakov
2015-07-21 20:05                                             ` J-P. Rosen
2015-07-21 21:02                                               ` Simon Wright
2015-07-21 23:40                                               ` Shark8
2015-07-22 12:58                                               ` vincent.diemunsch
2015-07-22 13:40                                                 ` J-P. Rosen
2015-07-22 14:29                                                   ` Vincent
2015-07-21 19:30                                           ` David Botton
     [not found]                                     ` <30336c64-ceaa-4887-adee-18cc58aef012@googlegroups.com>
2015-08-21  5:21                                       ` Shark8
2015-08-21 17:39                                       ` David Botton
2015-07-11  2:31                         ` Paul Rubin [this message]
2015-07-11  6:00                           ` J-P. Rosen
2015-07-11  7:51                           ` Georg Bauhaus
2015-07-11  8:47                             ` Dmitry A. Kazakov
2015-07-21  1:34                           ` Luke A. Guest
2015-07-27  9:09                       ` Assertions in SPARK (Was: If not Ada, what else...) Jacob Sparre Andersen
2015-07-27 10:56                         ` G.B.
2015-07-27 21:59                           ` Peter Chapin
2015-07-11 11:10                   ` If not Ada, what else Pascal Obry
replies disabled

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