Compiler/syntax checker with add-on functionality
-
Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards
-
Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards
:sigh: :sigh: :sigh: :sigh: the idea is best but hard for implement but not for a programmer
-
Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards
I think most people would download every plugin they can find. Now imagine every plugin creating separate versions that may or may not work well together. Source code isn't going to change once compiled; I do not see the advantage over loading a library and executing the containing code.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
I think most people would download every plugin they can find. Now imagine every plugin creating separate versions that may or may not work well together. Source code isn't going to change once compiled; I do not see the advantage over loading a library and executing the containing code.
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
You could change the syntax at places that are handy to you. I remember one article of ChristianNeumanns.He talks about functions, that should tell in their head, if they can return NULL (like Java does with exception). Because of that, he wrote a totally new language. Now, no matter how good his language is, if you can't use it, you can't have the features. But if you could load that "language feature palette" into your c++,java,smalltalk,c#,..., you can have the features in your current environment :) (?)
-
You could change the syntax at places that are handy to you. I remember one article of ChristianNeumanns.He talks about functions, that should tell in their head, if they can return NULL (like Java does with exception). Because of that, he wrote a totally new language. Now, no matter how good his language is, if you can't use it, you can't have the features. But if you could load that "language feature palette" into your c++,java,smalltalk,c#,..., you can have the features in your current environment :) (?)
D4rkTrick wrote:
He talks about functions, that should tell in their head, if they can return NULL (like Java does with exception). Because of that, he wrote a totally new language.
Sounds like overkill; and when encoding too much information in a name you get more unreadable code. My user-code could adhere to the same principle, I do not see what value the change to the language has (is it the language, or rather the framework? Sounds more like the latter one where somebody thinks his naming is 'better') I also do not see how this would work in practice; it may change code unintentionally whenever someone downloads a new 'keyword'. How would that affect code that's already compiled? I think the amount of actual keywords is limited, and the bulk of extensions will be done in usercode, using plugins. As for language-extensibility, I'm happy with the current .NET runtime; new keywords are defined (!) for each version, and they are consistent - with the added option to define your own language for the runtime, and the ability to extend the syntactic sugar using either a plugin for your IDE, or adding 'aspects' :)
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
-
Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards
D4rkTrick wrote:
I got the feeling, that new programming languages spread out of the earth like gras
Rather certain that that is a fact. Use the following to watch the ones that actually make it above the noise come and then go. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html[^] And an example of extremism https://en.wikipedia.org/wiki/Whitespace_%28programming_language%29[^]
D4rkTrick wrote:
So if you want the have a keyword X, you can just implement it as an add-on to the compiler.
To a large extent there have already been languages like that. "Forth" is just that. There was some other language sponsored by the US government (i believe) years ago that did something simpler. There is however a great deal of difference between whether something is possible and whether you should do it.
D4rkTrick wrote:
you might get in a situation like this:
Not me. I have learned that all of that is subjective.
D4rkTrick wrote:
which forces me to do a lot of writing for things, that could be automated
Learn how to do code generation. You write a program that takes in input source and outputs code. HOWEVER, that said, do not think that even most code can be created that way. At some point the very reason programmers are needed is due to the variable nature of what is needed. And writing a code generator that can handle that is not only impossible but even attempting to do so produces code in the generator that is a mess.
D4rkTrick wrote:
So then, the compiler would not be a blackbox anymore
You might enjoy taking some college level courses specifically addressing compiler design.
-
D4rkTrick wrote:
He talks about functions, that should tell in their head, if they can return NULL (like Java does with exception). Because of that, he wrote a totally new language.
Sounds like overkill; and when encoding too much information in a name you get more unreadable code. My user-code could adhere to the same principle, I do not see what value the change to the language has (is it the language, or rather the framework? Sounds more like the latter one where somebody thinks his naming is 'better') I also do not see how this would work in practice; it may change code unintentionally whenever someone downloads a new 'keyword'. How would that affect code that's already compiled? I think the amount of actual keywords is limited, and the bulk of extensions will be done in usercode, using plugins. As for language-extensibility, I'm happy with the current .NET runtime; new keywords are defined (!) for each version, and they are consistent - with the added option to define your own language for the runtime, and the ability to extend the syntactic sugar using either a plugin for your IDE, or adding 'aspects' :)
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)
Quote:
I also do not see how this would work in practice; it may change code unintentionally whenever someone downloads a new 'keyword'. How would that affect code that's already compiled?
oh, yeh, I actually didn't think of that! The portability would indeed suffer very much by adding such a feature. ...Also you made .NET a little bit more interesting for me :)
-
Quote:
I also do not see how this would work in practice; it may change code unintentionally whenever someone downloads a new 'keyword'. How would that affect code that's already compiled?
oh, yeh, I actually didn't think of that! The portability would indeed suffer very much by adding such a feature. ...Also you made .NET a little bit more interesting for me :)
-
Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards