4 ms·
At first I thought: Like every other "static Python to compiled language X translator" this one will only translate some static-enough subset of the language, a
by TimothyFitz 16y ago
At first I thought: Like every other "static Python to compiled language X translator" this one will only translate some static-enough subset of the language, at which point it's not Python. Interesting as usual, but mostly academic.
But then I started reading the source code, and the amount of python features supported with regression tests is impressive! (Especially for something coming from the Haskell community which is notoriously anti-automated-tests).
http://github.com/bjpop/berp/tree/master/test/regression/features/ http://github.com/bjpop/berp/tree/master/test/regression/fea...
Especially cool is the fact that you can use callCC!
- dons 16y ago> anti-automated-tests Ummm... the Haskell community invented QuickCheck and HPC, the limit case of automated testing tools... * http://en.wikipedia.org/wiki/QuickCheck http://en.wikipedia.org/wiki/QuickCheck * http://projects.unsafeperformio.com/hpc/ http://projects.unsafeperformio.com/hpc/
- viraptor 16y agoIt's true - Haskell people use a lot of testing, since it's pretty simple to do in that environment. However, compilers in my experience are extremely easy to test. You can start building your input at whatever stage of compiling you need, run a specific transformation phase on it and check the output. I'd risk the opinion that compiler is the easiest to test "advanced" piece of software. Because of that, I'd be more surprised by a compiler project without regression tests.
- doty 16y agoYou're right that it's pretty easy to write the individual tests. But on the whole, I disagree: in my experience, compilers for non-trivial languages have an extremely large surface area, especially when optimization is involved. Language features have the habit of interacting with each other in non-trivial ways, and the combinatorics can quickly get overwhelming.
- omaranto 16y ago"the Haskell community which is notoriously anti-automated-tests" What? That surprises me. I thought all Haskellers loved QuickCheck.
- pjscott 16y agoIf you're not familiar with QuickCheck, it's easy to get the impression that Haskellers aren't big fans of test suites because the type system catches so many bugs for which you would otherwise need a bunch of regression tests to find.