mirror of
https://github.com/JetSetIlly/Gopher2600.git
synced 2024-06-15 19:17:34 -04:00
2d5cae17f5
removed all messages from errors package. the strings are now hard coded in place. the original reason for extracting the error strings like that was (a) for redundancy and (b) for localisation possibilities. However, in reality there is not much redundancy and since the project started the scope of localisation is much larger (particularly due to the addition of a GUI) this is the first step. the next step is to remove the errors package altogether. recent additions to Go mean that the functionality of the errors package is no longer required. moreover, the original idea for the errors package functions turns out not to have been as useful as first appeared (the Error() functionality which makes sure no repeating sub-strings occur is probably better achieved with static tooling). one idea that comes from this which is quite interesting is the idea of a curated error. that is, any error that has been "wrapped" as some 'generic' type. the IsAny() function in the errors package effectively serves this purpose. we use that in one place in the input loop of the debugger. not strictly necessary but nice to have so it would ideal if we could remove the errors package but keep that idea. |
||
---|---|---|
.. | ||
doc.go | ||
patch.go |