This is series of interviews with software developers interested in Ada programming language. The goal is to promote the community members and the language itself. Do you want to take part in this? Contact me!
Could you introduce yourself? What's your background? What do you do?
My name is Luke A. Guest. I started programming on a ZX Spectrum where I learnt Spectrum BASIC, I later moved onto an Atari ST where I was mainly messing about in STOS BASIC. It wasn't until getting an Amiga 500+ that I came across a multitasking OS and started using more serious languages.
On the Amiga I learnt m68k assembly in a week and started messing about with the hardware, programming game type things, i.e. getting sprites on the screen and moving them about. Learning about the Copper was really cool, this extra processor with three instructions, which controlled the entire display something I'd never come across before. Other machines of the time either did what they needed with a single external chip, i.e. Spectrum's ULA, I have no clue what the ST used, but I know it wasn't anything special, only high-end machines, e.g. SGI, were using custom chips for each part of the hardware.
I can't remember the timeline exactly, but I did learn C at college on 386's at the time using Borland's Turbo C. I was also using AmigaE developing native applications on the OS using the Intuition libray (Amiga's UI). Even though I'd read that AmigaE had it's history in Ada, C++ and Lisp, I didn't really take much notice of the Ada part as I'd never heard of it at that time.
I had a number of Amiga machines, A500+, A1200, A4000 until I finally caved and went PC with Linux as the OS. I've been using Linux excusively since the late 1990's I think. I've used various distributions, Red hat, Manjaro, Debian, but finally stuck with Gentoo. I actually had Debian m68k running on my A1200 at uni.
I'm currently not doing any programming work now, but I am looking at getting back into it.
Why did you start using Ada?
We had to learn Ada at uni in 1995, then it was called Ada9X, they said it was going to be called Ada95 eventually. I have no idea how Ada9X from then differs from Ada95 now. I remember liking it, it made sense, but didn't stick with it at uni after the first year.
I was struggling for work and I ended up at a "games" company, which was a massive mistake, they were completely Microsoft based, using MSVC 6 and Sourcesafe. There were many red flags I should've taken note of and left, but I didn't and I suffered for it, my health has declined massively. We were promised a lot and they never delivered at all.
Initially the projects were in C++, compiles took ages because of templates, even with pre-compiled headers. Intellisense worked for the first week of the project then stopped and would never work again. It messed up formatting all over the place which in turn would make the compiler would complain because of missing braces. Trying to find that was a nightmare, because numerous closing braces were at the same level! You'd have to go and manually format it to find where it was missing a brace. These weren't small functions either, they were huge that would often go over multiple pages on a 17" monitor. VisualStudio 7 was in alpha at that time and it was really unstable and just not usable.
Another source of frustration were crashes, you could literally spend weeks inside the debugger (which was the only good part of MSVC, BTW) trying to find the error. The error was always a pointer or boundary error, which is the nature of working with such languages.
Due to working there, I burned out badly, I was massively underpaid and overworked (I'm talking 15 hour days at times) and treated like absolute shit, I was barely alive, to be honest.
They forced me out a month before they "went under" only to restart in private, they had the money by that time to do that due to not paying us properly. I decided I wasn't going back into games ever again and that I was not going to use C or C++ again if I could help it.
At least for my own projects, I didn't have to use it, I could whatever I wanted. I remembered using a language where I'd never had to touch a debugger with, that was Ada95, and I've been with it ever since. Since using Ada, I have had to go into a debugger, but nowhere near as much, but the reason for having to use a debugger? Always pointers, even Ada cannot stop this, but it can help by asserting on the error and giving exact locations of the errors.
I really think Ada is the best programming language for game development, it has all the tools you need built into the language.
What is the single feature you love the most in Ada?
Just like with any language, there is no single feature:
- Ranges, being sable to saying a percentage is
0 .. 100instead of just int, is so powerful.
- Attributes, having a type system that can be queried and the results used is amazing.
- Modular types, auto-wrapping types are used all the time, but you can easily forget to do it correctly, it's a simple thing, but at three in the morning it's not so easy to see an error. In games you want to have some kind of animated sprite, if it's a loop, you don't want to be checking which frame you're on, just increment the frame count, it does it for you!
- A real for loop which isn't dangerous like C's is, how simple is
for Index in -50 .. 75 loop? You cannot go wrong there, you can't use the wrong symbol and wonder why the final value isn't being iterated!
- Visible blocks using
- Packages, Ada has many ways to separate code, including separates.
- Real generics rather than hacky C++ templates.
- Not having to use
main()as your entry point, creating a function or procedure with the name of the application just seems obvious.
- Arrays can start anywhere, they can also be indexed by enumerations and characters (which are enumerations).
- With representation clauses you can define types with the exact data definition you need without issues . You can define this is a higher level, even a lower level language like C can't get that right.
What is the single feature you hate the most in Ada?
As with the previous list, there's no one thing:
- Strings are a mess.
- The ARG doesn't deprecate parts of the language properly, or at all?? The last time they did a major change was Ada83 -> Ada95, they need to do something like that again.
- The language doesn't evolve fast enough, the ARG is loathe to evolve the language too much as major changes will break compatibility with existing code bases, which is a fair point, but is also a good reason to do it as a new redesigned language.
- Ada has been irrationally hated since it's inception and people hate it without even giving it a chance. Some people look at it and if it doesn't look like C, they won't bother, even though it could easily save them hours of debugging time or thousands/millions in financing a project.
- IDE integration is non-existent to very basic, a lot of the complaints of Ada being "a pain to write" would be mitigated with auto-completion that works, and with LSP this is just the tip of the ice-berg.
- We cannot target iOS at all and Android easily, having an LLVM based compiler would help here.
- Monopoly of compilers. Vendors still think it's right to charge a fortune for access to their compilers, this isn't the 80's anymore, people didn't like it then, they don't like it now. There could be multiple compiler's out there and they could've been expanded to the new standards quicker if they were open.
- Unfortunately, representing endian-ness is a pain in Ada[1:1], it's not easily done and can only really be done with separate implementations for each endian type.
- No decent UI libraries are available for the language.
How do you see the future of Ada?
Ada has no future unless more people get on board using it, this means stupid licence games won't help. A lot of people coming to Ada still think it's licensed under GPL v3 only, which means your source has to be GPL v3! This is so wrong, only AdaCore's Community Edition is GPL v3 licensed in this way. If you want your freedom, use the FSF versions from your OS distribution, or MingW if you're on Windows, or the GNAT from BREW if you're on Mac OS X.
Take a hint from what happened to Eiffel, if you want a language to grow, it cannot be closed or pay walled.
Ada is still the only properly designed programming language out there. It's still got things other languages still don't have or are implementing badly in the runtime or templates, cough C++!
If more people don't use the language, there will be nobody to take over at the ARG when the inevitable happens. Which means that the language won't evolve.
Take a look at all the social media sites which have an Ada forum, they apparently list hundreds or thousands of people, yet there's only really about 5-10 people who ever post. There's a lot of people, apparently, who could be helping make a decent community, but they're not. I've heard the argument of that they're under NDA's, security clearances, etc., but that doesn't stop you from helping out. Having Ada as only a security language isn't a good idea, it's capable of so much more, it is a general purpose language, after all!
We all know Ada 202X is around the corner. What would you like to find in the new release of Ada?
I already know what's in the specification, it's an open process, sort of, Ada 2020 Amendment Proposals As of February 11, 2019 and Ada 202x Language Reference Manual - the best new part is the parallel blocks.
I've had thoughts of using these parallel blocks for GPU offloading, there's no reason why we cannot compile Ada to SPIR-V for example:
procedure Do_Something with GPU => SPIR_V;
On the whole, the new parts are not enough, they're only really handling bits of issues people have had with the language, like having a user defined
'Image attribute so you can define one for your new type and output an image which makes sense. Or making certain packages more Unicode friendly.
I would like to see a redesign of the language or a new language which takes the good bits and discards the bad bits. Something that is more rounded, orthogonal and more modern, i.e. Unicode String types done properly, there's nothing stopping a language supporting extra string types for Latin1, just not 16 and 32 bit versions, use Unicode for that.
'Image for debugging only, this is currently the only form allowed by the designers of the language, you're supposed to use the generic packages inside
Text_IO if you want more formatting capabilities. Really, they should've added more parameters to
'Image to make it better, along with custom image attributes, that would be perfect. Think about all the different text formats in use now, we could easily convert to JSON, TOML, YAML, whatever?
I'm currently interested in pointer-less programming, I had a look through Niklaus Wirth's Modula specification and they have no pointers there, admittedly this is a language for tiny CPU's like a Z80, which is fine, but that doesn't mean it cannot be done, see Java, but make it better. I like the idea of nullable types which can be null, but the language does the tests for you or at least makes it easier, see Zonnon's nullable types and
Working with image data is done all the time, yet you're forced to do it with a single dimension array; this is also where zero-based array indices really shine, BTW. If you can slice one of those arrays, why not have multi-dimensional array slices? It can be handled by the compiler easily and mapped to calls to
memcpy() if that's how you do it. Say you want to copy a 2D portion of one larger image into it's own image, having some sort of
My_Image (x1 .. x2, y1 .. y2) operation makes so much sense.
Concurrency at a lower level than Ada's tasks, there's no reason why you cannot build higher level task like objects, in terms of the lower level concurrency primitives. Any language which boasts concurrency built in now, has to do it better than the rest, so there's that to cope with also.
One of the complaints against Ada currently is the amount of generics you have to implement to get anything done, a new language has to have this in mind.
We're not getting away from C or C++ any time soon, so any new language has to support variadic functions, even if it's just for importing from those languages and restricted so it cannot be used in the new sane language. I'm pretty sure, variadic functions were invented because the C designers didn't think of allowing overloaded functions, which is the correct way to handle this.
I would even toy with the idea of removing semi-colons, thus possibly attracting Python programmers to the new language.
I would replace
do, I think this would help disassociate this new language from Pascal. For some reason, people hate the
begin..end, but in Pascal, it's everywhere, in Ada, it's not, it's only statement blocks which have them.