I've been very interested in writing compilers but have been scared off by the complexity of it. I've finally took the plunge and started writing my first compiler and the language I picked is Brainf*ck as I think that it would relatively easy to implement and I could implement the full language. This brings me to a question: does the source language matter? Should I be using a real-world language and just use a subset of the language (such as a subset of C/Java/etc.)? Is there any benefit to starting with a non-real world language (aka esoteric)?
Does the source language matter for your first (few) compilers?
learning;compiler
Yes, the language matters. Brainfuck (to use your example) is so trivial, it barely qualifies as a language. In particular, each significant character of input is (almost) a complete command in itself. Since you don't have statements (at least in the normal sense of the word) an implementation doesn't need (or have any use for) a parser.Given that the parser is pretty much the core of a typical compiler or interpreter, implementing a language that doesn't need/use a parser doesn't teach you much about implementing a more conventional language for which a parser is/will be necessary.