Tag Info

New answers tagged

2

They mean that you shall be required to write things that could reasonably be inferred from other things in the code. But you will not be implementing the same thing twice. An example of what they mean is type systems. You might be able to infer the existence and types of variables from their usage, but the redundancy of explicit declaration can catch ...


3

In this context "redundant" means that program's behavior is described multiple times. But "not duplicative" means that each of the of the specific types behaviors is different. For example, automated testing. The code is "redundant", because the behavior is described twice : once in code and once in form of automated test. But it is not duplicative, ...


1

It weakens your types, meaning the type checker will catch fewer programmer errors. Whether you consider that a good or bad idea depends where you fall on the weakly/strongly typed spectrum. I can think of a few situations where it might cause problems, such as if you wanted to override the function to have a separate version that just takes a bare string. ...


2

If you want to have a compiler for language X be self-hosting, your first have to implement it in some other language, say Y, such that it takes input for language X and spits out assembly code, or some intermediate code, or even object code for the machine the compiler is running on. You want to choose language Y to be as similar to language X as possible, ...


1

Is it possible to produce a programming language that is not well designed for writing a compiler but is well designed for some other purpose? Looking at a language like SQL I suppose the answer is yes. But languages of that nature are not general purpose.


9

People create new general purpose languages for one main reason: they hate at least one thing about every other language out there. This is why so many languages don't get off the ground. You have a great idea for a language that would improve your programming life, but you have to make the first implementation in a language that annoys you in at least ...


13

The goal of having a compiler in the language that is being compiled is often part of the practice of "eating your own dog food." It demonstrates to the world that you consider the language, compiler, and ecosystem of supporting modules and tools to be "good enough for serious work" or "production ready." It also has the virtuous effect of forcing those ...


0

It shows that the language is capable of processing complex parsing jobs and translating to another language/interpreting itself. In the process of creating a compiler (the first big project) there will be issue that come to the fore.


13

Wouldn't it make more sense to spend the effort working in something that will give better results? Like what? The nice thing about compilers is that they don't have many dependencies. This makes them good candidates for a new language that likely doesn't have a very large or diverse standard library yet. Better yet, they require a variety of things, ...


1

Who says that? ...anyway, it's just an opinion. Some might agree, some may not, there is no right or wrong here. Some languages have compilers written in itself, others don't. Whatever. Nevertheless, I think it's a nice exercice/proof-of-concept if a language is able to "self-compile" ...it's just ...nice ...and it prooves the language is suited to do some ...



Top 50 recent answers are included