3 ms·
> when one writes CSS or Makefiles they are programming They're not? At least that's not how I see it being called
by doliveira 5y ago
> when one writes CSS or Makefiles they are programming
They're not? At least that's not how I see it being called
- Someone 5y agoFor GNU make, it depends on the makefile. https://okmij.org/ftp/Computation/#Makefile-functional https://okmij.org/ftp/Computation/#Makefile-functional: The language of GNU make is indeed functional, complete with combinators (map and filter), applications and anonymous abstractions. Yes, GNU make supports lambda-abstractions. The following is one example from the Makefile in question: it is a rule to build a test target for the SCM Scheme system. The list of source code files and the name of the target/root-test-file are passed as two arguments of the rule: make-scmi= scm -b -l $(LIBDIR)/myenv-scm.scm \ $(foreach file,$(1),-l $(LIBDIR)/$(file)) \ -l $(2).scm The rule returns the OS command to interpret or compile the target. It is to be invoked as $(call make-scmi,util.scm catch-error.scm,vmyenv) As in TeX, the arguments of a function are numbered (it is possible to assign them meaningful symbolic names, too). Makefile's foreach corresponds to Scheme's map. The comparison with the corresponding Scheme code is striking: (define make-scmi (lambda (arg1 arg2) `(scm -b -l ,(mks LIBDIR '/ 'myenv-scm.scm) ,@(map (lambda (file) `(-l ,(mks LIBDIR '/ file))) arg1) -l ,(mks arg2 '.scm)))) (via https://stackoverflow.com/a/3480982 https://stackoverflow.com/a/3480982, which gives a Fibonacci example)