We present the wamcc system, a Prolog compiler that translates Prolog to C via the WAM. This approach has some interesting consequences: simplicity, efficiency, portability, extensibility and modularity. Indeed the system does not incorporate complex optimizations but is as efficient as Quintus Prolog 2.5 (based on an emulator written in assembly language) and only 30 % slower than Sicstus Prolog (compiling to native code). It is instantly portable to any machine with a C compiler and easily expandable with various extensions, such as constraints, as shown by the clp(FD) system which is based on wamcc. It also incorporates a simple but efficient handling of modularity thanks to the use of C modularity.