Schlagwort-Archive: software


Für einige Programmierer. Es gibt eine völlig unterschätzte Sprache, Lisp in diversen Varianten. Ein Beispiel was ein Lisp kann, aber nicht viele andere Sprachen:

(defmacro define-advice (symbol args &rest body)
  "Define an advice and add it to function named SYMBOL.
See `advice-add' and `add-function' for explanation on the
arguments.  Note if NAME is nil the advice is anonymous;
otherwise it is named `SYMBOL@NAME'.

  (declare (indent 2) (doc-string 3) (debug (sexp sexp body)))
  (or (listp args) (signal 'wrong-type-argument (list 'listp args)))
  (or (<= 2 (length args) 4)
      (signal 'wrong-number-of-arguments (list 2 4 (length args))))
  (let* ((where         (nth 0 args))
         (lambda-list   (nth 1 args))
         (name          (nth 2 args))
         (depth         (nth 3 args))
         (props         (and depth `((depth . ,depth))))
         (advice (cond ((null name) `(lambda ,lambda-list ,@body))
                       ((or (stringp name) (symbolp name))
                        (intern (format "%s@%s" symbol name)))
                       (t (error "Unrecognized name spec `%S'" name)))))
    `(prog1 ,@(and (symbolp advice) `((defun ,advice ,lambda-list ,@body)))
       (advice-add ',symbol ,where #',advice ,@(and props `(',props))))))

Man muß dazu schon, was mir AOP anfangen können, um da mitzuziehen. Und das ist Standard in so gut wie jedem Lisp. Im Beispiel ist es Emacs-Lisp eine Programmiersprache so alt wie der Emacs selber, also seit 1984 (und das sind nun 2023 – 1984 = 39 Jahre). Und Lisp ist noch älter, es war immer schon eine programmierbare Programmiersprache. Neue spezielle Schleifen – check. Einseitige Fallunterscheidungen wie when und unless – check.

Viele lachen über Lisp, aber nur noch wenige wissen, was Lisp Machines waren und was die boten.

Lispprogrammierer kann man mit Liberalen in der Politik vergleichen 😉

My take on it

I maintain some software for around 8 years now. And I just can tell from that: Organize your code and rewrite if it has some quality. The software I have, works but is terrible hard to extend and the really realyl big problem. I do have to add this extensions over and over again. At least if it’a about order, I’ have 4 different areas which nearly are the same to change. That makes it terrible and you can bet, I’ll oversee one area nerly always.

Be very carefula bout redundancy, but don’t get folled and think it’s always bad, but if it’s in more then three places, you are in deep trouble.

Yes quality matters and it’s worth it. It’s worth your time and it will hamper the further development if you don not care about it deeply.