|
|
|
|
|
by Scriptor
6002 days ago
|
|
Thanks for the suggestions. 1. Pretty likely, though I'm a little hesitant to replace the current syntax for if. The others shouldn't be hard to implement. 2. I've been planning to use the vector literal syntax. I've basically been lazy since PHP's array() construct makes it easy to cheat. 3. Indexing into arrays presents a problem. Pharen doesn't know what's a scalar, array, or function name at the moment so a special function for indexing is needed. One possible solution is to prefix an array's name, so it would be (:some_array 4) or something similar. I personally think the superglobal syntax is cleaner, if not more succinct. Any suggestions? 4. I haven't implemented an object system yet because I want to try something new here instead of simply copying PHP's syntax. |
|
2. Sweet.
3. (:some_array 4) seems perfectly reasonable. Would that interact with superglobals the same way? e.g. ($:server "PHP_SELF"). I believe that PHP 5.3 or 6 has return value dereferencing, so I don't think it's necessary to know the type - you could just do (:(array 1 2 3) 1)
4. If you haven't played with Clojure, you might find inspiration there. It has interop with native Java instances, though I find it a little too syntaxy for a Lisp, and PHP doesn't have such deep class structure.
Thanks for responding.