3 ms·
I'm sad that no one wrote it in the subset of Java that it was going to compile.
by spullara 7y ago
I'm sad that no one wrote it in the subset of Java that it was going to compile.
- denormalfloat 7y agoIt's more surprising because javac is itself written in Java. It's definitely up to the task (even if it's targeting x86 instead).
- spullara 7y agoMaybe no one thought of the immense satisfaction they would get at the end when they compile their compiler to x86 code after compiling it with javac to bytecode to run it the first time.
- mruts 7y agoThey probably wouldn't have been able to finish the project in time.
- ncmncm 7y agoAnd a good professor would have flunked them for poor judgment.
- saagarjha 7y agoI doubt I will ever be a professor, but I would be happy to pass any student who did this provided they did the task adequately. Maybe extra points for cheekiness.
- trishume 7y agoMy professor was definitely a good professor and no way they would have done that. It clearly would have been done as an added challenge for themselves for fun and there's no reason to penalize that.
- abecedarius 7y agoIt's definitely fun: you can also take part of the challenge to be figuring out what parts of the full language are worth adding to make the overall job easier (so you're not taking the language subset as set in stone). When I did this for Python I started out in unrestricted Python, gradually both increasing what's implemented and reducing what's used. (Result at https://codewords.recurse.com/issues/seven/dragon-taming-with-tailbiter-a-bytecode-compiler https://codewords.recurse.com/issues/seven/dragon-taming-wit...)