8 ms·
So if Janet refactored the interpreter to use linked lists, CONS/CAR/CDR everywhere in the C code but the language stayed the same (if possible) would it fit yo
by latenightcoding 3y ago
So if Janet refactored the interpreter to use linked lists, CONS/CAR/CDR everywhere in the C code but the language stayed the same (if possible) would it fit your definition of being a lisp ?
- lispm 3y ago> So if Janet refactored the interpreter to use linked lists Which interpreter do you mean? A Lisp interpreter, which runs Lisp source code or a byte code interpreter? Lisp is defined that it processes lists, either compiled or interpreted. I'm looking at interpreted Lisp code in a debugger: CL-USER 19 : 1 > :lambda (LAMBDA (A) (DECLARE (SYSTEM::SOURCE-LEVEL #<EQ Hash Table{0} 8010058C43>)) (DECLARE (LAMBDA-NAME FOO)) (SETF A (+ 10 A)) (BREAK) (+ A 20)) CL-USER 20 : 1 > (car (nthcdr 5 *)) (BREAK) The code which is interpreted, is Lisp code in the form of lists. Lists are processed in user programs and the implementation itself processes Lisp code in the form of lists. Both are using the same list data structure, the same representation of the list data structure and the same primitive operators for it. For me that's the core of Lisp. If the language and its implementation does not process lists, then don't call it to be a "List Processor".
- eimrine 3y agoAm I understand right that Janet becames a Lisp (in your understanding of Lisp) if two conditions will be fullfilled: if everything will be reimplemented on linked lists with CAR/CDR everywhere and also a byte code interpreter will somehow coerce all the C syntax with ability to recompile all C code in such a way to fullfill a "no compile time" condition and that's it? Sorry for speaking about things I do not understand, just I am searching for a comprehensive answer in "C vs Janet" question. I have a feel that there is something beautiful in Janet but I don't know what, so I have started this tree of discussion.