Preface
The previous incarnation of this book was written when Julia was at v0.2, which scurried up to v0.4 by the time it went to press. Now I have been persuaded that a second version is overdue, and similarly, it was at v1.8.2 when I began and is now v1.9.4 but with a v1.10.x out as a release candidate and even v1.11 in development.
Why so long between editions? Julia in the past has not been reluctant to modify the language and seemingly continues to do so at the present time. There are many pitfalls in ignoring backward compatibility when developing a computing language. An example that probably many readers will be aware of is when Python tried to slither up from version 2 to version 3, a sizeable minority of the users had to be dragged screaming to make that leap and it was only when support for version 2 was effectively withdrawn that this happened.
More alarming was when Perl, which once held the position that Python holds now (circa. 2023) moving from v5 to v6 proved so impossible that Perl 6 was renamed (a couple of times) as a new language, one which is rarely used, as is also Perl 5.
So given the gap between the two versions of the book, it is to be hoped that Julia, now well past v1.0, which was announced at JuliaCon 2018 when it was hosted here in London, might at least have now settled down and done without the dreaded depreciation warnings which eventually turn into errors. Moreover, since many Julia packages are written in 100% native Julia code, the effects of changes made in Julia are widespread and packages need to be promptly maintained or the packages should be retired.
Turning to the content of the book, its philosophy remains the same as earlier. So, it will not start by discussing how to print “Hello World” nor how to compute the result of 1 + 1, although there is a version of the former, a metaphorical wolf in sheep’s clothing, so it can be found!
Again, I’m not discussing the usual programming constructs for looping and branching, but rather highlighting some Julia constructs that may not be familiar to all, such as list comprehensions, broadcasting, etc., and of course, dealing with topics such as the Julia type system. The examples are not overly sophisticated but hopefully detailed enough that they will be interesting and importantly runnable for some time in the future.
The chapter count now has risen from 10 to 11, this is due the some of the material in the Dispatch and types chapter being split out into separate chapters, the second one being enigmatically entitled: 3M’s, viz., referring to multiple dispatch, macros and modules, all of which will have been met already in some to the earlier material in the book. This means that now the first five chapters are mainly aimed at Julia’s programming and the next five at themed topics, all promoted by an extra number, are akin to those previously and with the material in these being brought up to date. The final chapter is somewhat different, another with an enigmatic name?!