Up to Main Index Up to Journal for August, 2014 JOURNAL FOR TUESDAY 12TH AUGUST, 2014 ______________________________________________________________________________ SUBJECT: Big can of worms DATE: Tue 12 Aug 19:55:41 BST 2014 As I predicted I had a quiet weekend with a lot of coding :) I started by looking at and hacking on the command processing code. However it quickly became apparent that I needed to sort out item two on my list before being able to make any real progress. What was item two? Item two on my list of 'things I really need to get sorted out' was to reorganise the package layout. Package layout was reorganised very early on in this incarnation of the project. However I was still very OOP guided. As a result the packages tried to enforce a hierarchy that Go does no have. As a result the current package layout causes a lot of issues. A prime example is the player package. This lives under /entities/mobile/player but we don't actually need the player package or the mobile package - it can all be part of the entities package! The only 'organisation' that is needed is to keep player and mobile in their own sources files so we don't have huge files to work through. Introducing a slight tangent - there was an article[1] I read a while ago about inheritance and composition. I know the difference and I know Go is excellent at composition/embedding. I just hadn't given it much serious thought - weird eh? :( Go read the article and see for yourself... A long while ago I also did a lot of thinking about how to resolve the HUGE mess of circular dependencies I was running into and wrote a bit about it[2]. Setting the command process code aside I started looking at package reorganisation and soon had a lot of circular dependencies and other issues. It looks like things were worse than I thought. Fret not! I'm working on it. -- Diddymus [1] Joost's Dev Blog, Why composition is often better than inheritance: https://joostdevblog.blogspot.co.uk/2014/07/why-composition-is-often-better-than.html [2] ../../2013/8/22.html Up to Main Index Up to Journal for August, 2014