#+TITLE: Sex field notes Language bugs and friction met while building vs-map-viewer, against sexc at ~/dev/sex. Newest first. * A malformed =for= crashes the compiler sexc dfafe8b. Writing the C-style grouped header #+begin_src scheme (for ((var i int 0) (< i 4) (++ i)) ...) #+end_src instead of =(for (var i int 0) (< i 4) (++ i) ...)= dies inside the writer with no source location: #+begin_example Error: (caddr) bad argument type: () fmt-c-writer.scm:112: scheme#symbol->string #+end_example Expected: a diagnostic naming the file, the line and the expected shape of =for=. * Spurious "cannot type this" on a header pointer sexc dfafe8b. In =src/viewer.sex=: #+begin_src scheme (var font (* struct nk-font) (nk-font-atlas-add-default ...)) (/= (. font handle height) scale) #+end_src This warns =cannot type this; `.' reads it as a value font=, yet the emitted C is the correct =font->handle.height /= scale;=. The variable's type is written out, so the warning is wrong on both counts: the type is known, and the access isn't read as a value. The nearby =(& (. font handle))= gives no warning. * No dependency output sexc has nothing like =cc -MD=. An =import= pastes the imported module's public forms into the importer, so the Makefile has to make every Sex object depend on every =.sex= source.