Hacker News new | past | comments | ask | show | jobs | submit login

> Assuming JavaScript compatibility, what techniques could be applied to minifying code?



You can minify code ensuring absolute correctness or make substitutions that are almost always correct.

For example, there are some cases where you could replace tests like `x===y` with `x==y` but this may not work in all cases. If you accept imperfect translation, then this is a valid technique, but it should be clear that the translation isn't perfect.

The reason why my question is different is because I'm asking about the constraints on the format. For example, is run-length encoding (RLE) acceptable? That wouldn't be acceptable for a .BMP bitmap




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: