5 ms·
You may want to check out Crystal https://crystal-lang.org/ https://crystal-lang.org/ -- you will get all of the positives you describe, while avoiding perhaps
by compumike 4y ago
You may want to check out Crystal https://crystal-lang.org/ https://crystal-lang.org/ -- you will get all of the positives you describe, while avoiding perhaps 3 out of 4 of your listed negatives. (I think your "ease of iteration" point will still probably win for PHP vs any compiled language.)
Also, I'm very curious: how does the KLOC count compare for the PHP and Rust versions?
- muglug 4y ago> how does the KLOC count compare for the PHP and Rust versions I don't have exact numbers since it's not a straight port — the original PHP code was written to analyse a slightly different language than the Rust version I'm building. I'd estimate that Rust requires you to be about 10% more verbose than PHP. Main annoyances vs PHP: no default argument values, and only a single let allowed inside an if conditional.
- ByteJockey 4y ago> I think your "ease of iteration" point will still probably win for PHP vs any compiled language. While I don't think you can beat straight php/js/python for this, there's still a lot of room for improvement over the rust/c++ magnitude of compile times. For example Go/OCaml/Common Lisp (at least, SBCL is a compiler, there are lisp interpreters), all have reasonably quick compile times. And the latter two have repls, which really does help improve the iteration cycle. I haven't had to play with crystal, where does it fall on this spectrum?