comp.lang.ada
 help / color / mirror / Atom feed
* Help with book, "Ada for Pyjama Coders"
@ 2012-08-09 20:50 Patrick
  2012-08-09 21:57 ` Nasser M. Abbasi
       [not found] ` <3229289u6e6af325luuheq2lb0er5m240k@invalid.netcom.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Patrick @ 2012-08-09 20:50 UTC (permalink / raw)


Hi Everyone

I was going to leave this until i was a long a little further but I want to talk about it now due to Dufr's last thread.

I rarely get to program while my kids are awake. I code in my pyjamas after they go to bed. I have a whole bunch of Ada books and to be honest they have been very painful to read so late at night.

I would have loved to have had an easy book that just introduced the basic subset. I want to write a short book(maybe 50 to 70 pages) that will just prep someone for the full sized Ada books.

I also think it's sad that there are "new" languages like Go that don't really do much more then Ada 83 + half 95. If Google just picked an Ada subset and supported that, Ada would be the new and coolest thing.

I don't think people like me need multiple inheritence and other Ada 2005 features and I bet I won't need Ada 2012 features either. A book that was not cluttered with these is just what pyjama coders need.

I am collecting code segments

I have several already but below are some samples.

I plan on annotating each one of these:


procedure Procedure_Example is
--variable declarations go here
begin
null ;    
end Procedure_Example;


procedure In_Parameter_Example  ( y : in  Integer ) is
   x : Integer := 1;
begin
null ; --do something with x and y   
end In_Parameter_Example;


procedure Out_Parameter_Example ( y : out Integer ) is
   x : Integer := 1;
begin
null ; --do something with x and y  
end Out_Parameter_Example;

procedure In_Out_Parameter_Example ( y : in out Integer ) is
   x : Integer := 1;
begin
null ; --do something with x and y    
end In_Out_Parameter_Example;


procedure Access_Parameter_Example ( y : access Integer ) is
--variable declarations go here
begin
null ; --do something directly to y and not it's copy    
end Access_Parameter_Example;


procedure Default_Parameter_Example ( y : in  Integer := 0) is
   x : Integer := 1;
begin
null ; --do something with x and y     
end Default_Parameter_Example;





Do you see how each of these only introduces one concept at a time and does nothing in particular. I would have prefered to learn this way rather then a full example that introduces several concepts at once. I think it I have one of each of these on it's own page, with colour syntax highlighting it will be easy to follow lat at night.

Here is the rough table of contents I am considering:


Part 1 Ada 83 "ish" Ada
Lightning introduction to type system + Assignment statements
lightning introduction to gcc and gnat

identifiers, comments, null statement, blocks, scope, parameters, procedures, functions,

If statements, Compound conditions, case statement, Range tests, Loops, operators, packages, private types, generics, exception handling, renaming declarations, overloading

Multitasking, Task types, Communicating with tasks, select statements, rendezvous, Sharing data between tasks with a passive task,

Part 2
Types in more detail
Defining new data types, Integer, Subtypes, Derived types, Modular integers, Real types, Numeric literals, Constants, Enumerations, Boolean, Record types, Strings, Character types, array types, Discriminants, Limited types

Toolchains in more detail, GCC/GNAT, pragmas, interfacing with C and building shared C objects,

text input output, File input/output, Stream input/output

Part 3 A bit of Ada 95( No Ada 2005 and not all of Ada 95, no protected types etc. )
Tagged types, Tagged types


Appendix Ada Language legal rules
Nothing covered that will be in the appendixes of other books



Any feedback on this approach is welcome.


 





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

end of thread, other threads:[~2012-08-15  2:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-09 20:50 Help with book, "Ada for Pyjama Coders" Patrick
2012-08-09 21:57 ` Nasser M. Abbasi
2012-08-09 23:00   ` Shark8
     [not found] ` <3229289u6e6af325luuheq2lb0er5m240k@invalid.netcom.com>
2012-08-10  8:57   ` Patrick
2012-08-10 16:00     ` Anh Vo
2012-08-10 18:28   ` Robert A Duff

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