I'm writing some simple emacs tools for visual studio solutions.
I've got a function sln-process-csproj-file
. This function takes the path to a project, and returns a tuple that's just a data model of the innards of the project.
Right now the return value on the last line of that function is `(,project-name ,project-path ,project-files)
.
I have written three getter functions to use with the list:
(defun sln-project-name (project)
(nth 0 project))
(defun sln-project-path (project)
(nth 1 project))
(defun sln-project-files (project)
(nth 2 project))
Does this getter and setter boilerplate code match best practices? Is there a shorter way to write it?