When writing a scientific paper, how long should the paper be? The short answer: about 10 pages.
The long answer: Well, to some degree it does depend on the goal of the paper. Note that it does not depend on how complex the problem that you solved is. The main question is, at whom is the paper directed? Who is the paper intended to inform?
The justification for 10 pages as the optimal paper length is as follows. In a 4-page letter, you can't get out enough of the internals of the scientific process that you followed to allow your results to be fully reproducible. In a 30-page paper you risk loosing your audience. Be honest, how many 30-page papers have you read front-to-back recently? If you're like me you read the abstract, the conclusion, and, if it's really good, maybe the analysis section or something. The only reason to read a 30-page paper front to back is if it bears directly on the research that you are undertaking. While writing my dissertation, there was a paper that was like this for me. I had it on my desk reading, rereading, and deriving along with it for 6 months. I got through the first 15 pages.
So, 10 pages is about the right length for a casual but interested scientist to pick your paper up and read it. The reason for differing paper lengths is if your audience is not just the casual but interested scientist. If you have something brief that you want virtually everyone in your subfield to read, something like a 4-page letter may not be so bad. But its hard to fit anything complex in that kind of space.
The reason for writing a long paper is if you have a (relatively) captive audience and a complex idea or result that you want to convey. A paper that long reduces the number of readings by the casual but interested scientist crowd, but that might be an acceptable tradeoff in some cases.
But in general, design it to be 10 pages, and you'll be in good shape.