comp.lang.ada
 help / color / mirror / Atom feed
* Doing Ada right?
@ 2015-07-27 15:17 EGarrulo
  2015-07-27 16:32 ` David Botton
  2015-07-27 18:42 ` Jeffrey R. Carter
  0 siblings, 2 replies; 7+ messages in thread
From: EGarrulo @ 2015-07-27 15:17 UTC (permalink / raw)


While reading about Ada on StackOverflow, I have stumbled upon a comment that said that:

    there are 2 types of programmers: the people who are actually really good
    at Ada and can do it right, and those that "know" Ada, but program it in 
    a way/style representative of the 70s with older languages.[1]

So, how do you become really good at Ada?  By studying well-written Ada
programs, I suppose.  Hence, what programs would you recommend as study
material?

Thank you.

--
[1] http://stackoverflow.com/a/4028307/370132

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doing Ada right?
  2015-07-27 15:17 Doing Ada right? EGarrulo
@ 2015-07-27 16:32 ` David Botton
  2015-07-27 18:28   ` EGarrulo
  2015-07-27 18:42 ` Jeffrey R. Carter
  1 sibling, 1 reply; 7+ messages in thread
From: David Botton @ 2015-07-27 16:32 UTC (permalink / raw)



> So, how do you become really good at Ada?

1) If learning Ada read - Ada Distilled - see http://LearnAdaNow.com for links
2) If already know or done with #1 - learn to be "type centric" in your development (here is an interesting article - http://blog.kickin-the-darkness.com/2007/08/fundamental-theory-of-ada.html)

Ada understood the importance of type long before Haskell ever came along and does it in a way that allows for imperative programming so reuse from readability is a reality. (I'm sure some math centric people believe Haskell is readable...)

David Botton


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doing Ada right?
  2015-07-27 16:32 ` David Botton
@ 2015-07-27 18:28   ` EGarrulo
  0 siblings, 0 replies; 7+ messages in thread
From: EGarrulo @ 2015-07-27 18:28 UTC (permalink / raw)


On Monday, July 27, 2015 at 6:32:45 PM UTC+2, David Botton wrote:
> 2) If already know or done with #1 - learn to be "type centric" in your development (here is an interesting article - http://blog.kickin-the-darkness.com/2007/08/fundamental-theory-of-ada.html)

This was an interesting read, thanks.  Indeed I am looking for these kind of suggestions, to learn how to "think in Ada".

The Ada standard does come with a Rationale, but the Ada 2012 Rationale compares Ada 2012 to Ada 2005... I suppose that I could read all the Rationale documents since Ada 83, but that would be too much reading, I am afraid.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doing Ada right?
  2015-07-27 15:17 Doing Ada right? EGarrulo
  2015-07-27 16:32 ` David Botton
@ 2015-07-27 18:42 ` Jeffrey R. Carter
  2015-07-28  6:42   ` Egil H H
  1 sibling, 1 reply; 7+ messages in thread
From: Jeffrey R. Carter @ 2015-07-27 18:42 UTC (permalink / raw)


On 07/27/2015 08:17 AM, EGarrulo wrote:
> While reading about Ada on StackOverflow, I have stumbled upon a comment that said that:
> 
>     there are 2 types of programmers: the people who are actually really good
>     at Ada and can do it right, and those that "know" Ada, but program it in 
>     a way/style representative of the 70s with older languages.[1]

The "2 kinds of programmers" probably represents my frequent comment about the 2
kinds of developers: coders and S/W engineers. Ada is designed to support the
way S/W engineers think. Those who like Ada and are good at it are largely S/W
engineers, while those who dislike it and fight with it are generally coders.

So part of how to become really good at Ada is to be a S/W engineer. Another is,
as you realized, to read lots of Ada. You should start with Annex A of the ARM.

http://www.adaic.org/resources/add_content/standards/12rm/html/RM-A.html

This is stuff that you should be familiar with anyway if you're using Ada. Then
you can look at some of the Ada code that's out there and publicly available.
There are a number of demo programs at the Gnoga site

gnoga.com

and numerous Ada libraries. One is the PragmAda Reusable Components

https://pragmada.x10hosting.com/pragmarc.htm

There are 2 versions of this one, one for Ada 95 and one for the 07 version of
Ada. You might find it interesting to look at the differences between the 2.

You should think about what you like and dislike in the code you read. It's not
all going to be great. Why did they do things that way and not another? What
would make it clearer or easier to use? I've always wondered why Ada.Text_IO
overloads things with and without a File parameter, rather than having one
version with the File parameter defaulted to Current_Input.

Finally, you should write lots of Ada. You should do so knowing that you'll
throw away a lot of it. Think about it just as you do for the Ada you read.

-- 
Jeff Carter
"Why don't you bore a hole in yourself and let the sap run out?"
Horse Feathers
49

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doing Ada right?
  2015-07-27 18:42 ` Jeffrey R. Carter
@ 2015-07-28  6:42   ` Egil H H
  2015-07-28  7:06     ` Shark8
  2015-07-28 17:38     ` Jeffrey R. Carter
  0 siblings, 2 replies; 7+ messages in thread
From: Egil H H @ 2015-07-28  6:42 UTC (permalink / raw)


On Monday, July 27, 2015 at 8:42:19 PM UTC+2, Jeffrey R. Carter wrote:
> I've always wondered why Ada.Text_IO
> overloads things with and without a File parameter, rather than having one
> version with the File parameter defaulted to Current_Input.

Wild guess: 
It seems logical for File to be first parameter when writing to/from a file, 
so we need two versions in order to write Ada.Text_IO.Put_Line("Hello World");
instead of having to write Ada.Text_IO.Put_Line(Item => "Hello World");


-- 
~egilhh



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doing Ada right?
  2015-07-28  6:42   ` Egil H H
@ 2015-07-28  7:06     ` Shark8
  2015-07-28 17:38     ` Jeffrey R. Carter
  1 sibling, 0 replies; 7+ messages in thread
From: Shark8 @ 2015-07-28  7:06 UTC (permalink / raw)


On Tuesday, July 28, 2015 at 12:42:26 AM UTC-6, Egil H H wrote:
> On Monday, July 27, 2015 at 8:42:19 PM UTC+2, Jeffrey R. Carter wrote:
> > I've always wondered why Ada.Text_IO
> > overloads things with and without a File parameter, rather than having one
> > version with the File parameter defaulted to Current_Input.
> 
> Wild guess: 
> It seems logical for File to be first parameter when writing to/from a file, 
> so we need two versions in order to write Ada.Text_IO.Put_Line("Hello World");
> instead of having to write Ada.Text_IO.Put_Line(Item => "Hello World");

Well, if it was Put( Item : String; To : File ) it would still read well... though maybe best if it was called "write" in that case.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doing Ada right?
  2015-07-28  6:42   ` Egil H H
  2015-07-28  7:06     ` Shark8
@ 2015-07-28 17:38     ` Jeffrey R. Carter
  1 sibling, 0 replies; 7+ messages in thread
From: Jeffrey R. Carter @ 2015-07-28 17:38 UTC (permalink / raw)


On 07/27/2015 11:42 PM, Egil H H wrote:
> On Monday, July 27, 2015 at 8:42:19 PM UTC+2, Jeffrey R. Carter wrote:
>> I've always wondered why Ada.Text_IO
>> overloads things with and without a File parameter, rather than having one
>> version with the File parameter defaulted to Current_Input.
> 
> Wild guess: 
> It seems logical for File to be first parameter when writing to/from a file, 
> so we need two versions in order to write Ada.Text_IO.Put_Line("Hello World");
> instead of having to write Ada.Text_IO.Put_Line(Item => "Hello World");

If I were doing it, File, having a default, would be the 2nd parameter.

-- 
Jeff Carter
"There's no messiah here. There's a mess all right, but no messiah."
Monty Python's Life of Brian
84

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-28 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-27 15:17 Doing Ada right? EGarrulo
2015-07-27 16:32 ` David Botton
2015-07-27 18:28   ` EGarrulo
2015-07-27 18:42 ` Jeffrey R. Carter
2015-07-28  6:42   ` Egil H H
2015-07-28  7:06     ` Shark8
2015-07-28 17:38     ` Jeffrey R. Carter

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