EDIT: downvote count = a number of people who got no clue what meta language is.
EDIT: downvote count = a number of people who got no clue what meta language is.
Definitional arguments aside, this would mean that machine code is the best language, since all other languages are 'subsets' of it.
And this is exactly what superiority is about: you can do in Scheme anything that is possible in any language, existing or not invented yet. There is absolutely no way one can even compare meta-languages vs. fixed ones.
In the context of programming languages, "subset" implies that one language is identical in form and semantics to the other, plus some extra stuff. Good examples of this are Objective C and C++ to C. (Although C is not a strict subset of Objective C and C++, it is pretty close.)
What? It's totally irrelevant here.
> In the context of programming languages, "subset" implies that one language is identical in form and semantics to the other,
Exactly. And, say, a Pascal implemented as a thin macro layer on top of a Lisp is semantically 100% equivalent to a standalone Pascal.
In other words, you can build a Pascal (undistinguishable from the "real" one) on top of Scheme, but you cannot build Scheme on top of Pascal.
You can implement an interpreter or a compiler. But it won't turn your Pascal into Scheme.
> That is, I can write a Pascal program that, when given a program written in Scheme, executes the Scheme program according to the Scheme spec.
It's irrelevant. Can you mix a bit of Scheme code into a definition of a Pascal procedure, with all the local identifiers transparently available? No. But it's trivial the other way around.
A simple experiment for you: imagine you've got a system scriptable in Pascal. And you want to write your scripts in Scheme instead. Your actions? Implement a slo-o-ow and broken Scheme interpreter in that Pascal, right? And then think hard on how to do interop in between Scheme and all of the stuff already available for that Pascal. Funny and stupid.
Now, the other way around: you've got an embedded Scheme, but you hate all that parentheses and want to just code in Pascal. Fine. Write a little macro which will translate transparently your Pascal into Scheme. No runtime cost whatsoever and all the interop done for free. See the difference now?
Does this mean that C is "better by definition" than Scheme? No, both have their places. But any Turing-complete language with string handling is a "subset" of any other; that is an interpreter or compiler for that language can be written in any other language, so long as it's Turing-complete and can parse strings. If we look at which languages are "supersets" in practice, we find that C and C++ are the best languages ever by your theory, since many, many compilers and interpreters are written in them, while Scheme is a terrible language because compilers and interpreters are almost never written in it, even in most implementations of itself.
Your poor understanding of these pretty basic theoretical concepts and your silly fanboyism are why you're being downvoted.
You did not understand what static metaprogramming is, what is an extensible language, and yet you're talking about my poor understanding.
And, by the way, I fixed an inferior C. Any inferior language can be made superior by adding a tiny bit of compile-time Turing-completeness and a bit of compile-time reflection: https://github.com/combinatorylogic/clike
Made it equally powerful to Scheme, Forth, Nemerle, TH, C++ and the other proper meta-languages.
How little we talking here.
I bowed out of this conversation because the poster was talking in absolutes, and if you're willing to go to the extreme of implementing a Pascal compiler and runtime system in Scheme macros, then I think other extremes are on the table that can give similar functionality. But I didn't see such nuance getting across.
It's really hard to convey the gigantic difference in expressive power between the meta languages and the primitive ones to those who never got even exposed to the higher level methodologies, who never built elaborate DSLs.
And no, you're wrong in assuming that there are "other extremes" providing a comparable expressive power at no runtime costs. There are none, provably. You mentioned implementing compilers or interpreters in any Turing-complete language - but it won't solve the interoperability issue between the host, the implemented new language and any languages you'd build on top, which may need to borrow semantic building blocks from your new language. As soon as you start to address these concerns, you'll end up turning your host into a proper meta-language (as I did with C, for example).
So presumably for this to be exciting, it would have to be executing in a larger environment where it's surrounded by racket code doing its own thing. But now I don't see what's so special about that, and why that's different from, say, a python script that takes a string of fake-pascal, turns it into python thru an internal processor, and then calls an eval.
So, this is essential for building rich DSLs. See my framework as an extreme example of such an approach.
No, people simply don't like "language fanboy-isms" here.
The reality is that no language is "superior by definition." Some languages are better at certain things than others depending on the task at hand, and many other factors.
I said specifically that any metalanguage would do. And there's a lot of them. I do not care which one to use.
> The reality is that no language is "superior by definition."
Then you do not understand what "superior" means.
> Some languages are better at certain things than others depending on the task at hand, and many other factors.
A language A which contains all the features of a language B, plus a bit more, is superior by definition, because it can seamlessly replace language B without anyone noticing.
Is it unanimously agreed that C++ is "superior by definition" to C? What about Objective-C?
E.g. "any other language out there is just a subset of Lisp" is just a fun statement in a Greenspun's tenth rule way. You say it like you mean it, which means you don't understand the importance of syntax, semantics, type systems, and several more concerns (not to mention pragmatic issues like ecosystem and tooling).
You also yield "metalanguage" like its conventional CS wisdom that being a metalanguage is some magic bullet trait, that makes it "superior simply by definition".
(Not to add that you don't understand the definition of "metalanguage", which would also include things like Antlr, m4, PEG, transpiler generators, and such, for which there's nothing "superior" to a conventional language. Not sure were you picked the terminology up, probably some book or article, but it doesn't mean what you think it means).
And again, evidently, you've got no idea what proper meta-languages are (i.e., featuring a static compile-time metaprograming with a full, again, compile-time reflection). And yes, I'm perfectly aware of the fact that even majority of Lisp users got no clue how to use metaprogramming properly.
> You say it like you mean it, which means you don't understand the importance of syntax, semantics, type systems, and several more concerns
Obviously you do not understand metaprogramming. I do not care at all about syntax, semantics, type systems and all that of a host meta-language. I can build any combination of this stuff on top, easily. Of course as long as the host language is not trying hard to break things - this is what separate a proper metalanguage from an inferior one.
> (not to mention pragmatic issues like ecosystem and tooling).
Again, you do not understand metaprogramming at all. Once you start parasiting on any given language you're getting all of its ecosystem and tooling in, for free.
> You also yield "metalanguage" like its conventional CS wisdom that being a metalanguage is some magic bullet trait, that makes it "superior simply by definition".
I gave a definition, if you did not notice. A meta-language is the one which can be turned into any possible language, statically.
> which would also include things like Antlr, m4, PEG, transpiler generators, and such, for which there's nothing "superior" to a conventional language.
I gave my definition, which (conveniently) fits Lisp in.
> Not sure were you picked the terminology up, probably some book or article, but it doesn't mean what you think it means
Not sure you know it better.
Please don't conduct programming language flamewars on HN. Discourse here must remain civil and substantive, even when the other person is also being rude (as in fact is the case). Please read https://news.ycombinator.com/newsguidelines.html.
You're being downvoted because you're breaking this rule, not because of your argument. This community is replete with lovers of Lisp, including the person who built HN and us who work on it, so that's hardly the issue.
If there's one thing we will never allow to happen it's HN turning out like comp.lang.lisp.
Edit: I've detached this subthread and marked it off topic. Your thoughts on Lisp are welcome here, but please be respectful from now on. The Principle of Charity is what we shoot for in arguments here: https://en.wikipedia.org/wiki/Principle_of_charity.
If that was the case I wouldn't be being upvoted (as I'm, as you said "also rude"), but I am. So I maintain that the downvotes to the parent was for the content (or the content too), not merely the tone.
That said, I take some offense into that I was "rude".
I merely replied in a much kinder tone to the parent comment that wrote "downvote count = a number of people who got no clue what meta language is". That initial tone provoked my response.
When that was shot down with "you got no clue either", I came back with further explanation -- to which I got his response that you commented on.
In any case, apart from the tone, for which I can apologize, do you agree, on the technical and CS side, with what the parent wrote?
I like and appreciate a great many of your comments and think you're a net positive contributor to HN, who has significantly enhanced the intellectual diversity of the site over the years (on a lot of things if not programming languages!). Unfortunately, your comments have also often been abrasive in a way that at best skirts the HN guidelines and sometimes plainly violates them. I wish you would work on eliminating that.
On a large public forum, when someone is a good writer and makes cogent points and is abrasive, it gives license to everyone who isn't a good writer and doesn't make cogent points to just (begging your pardon) pee in the pool. It's a destabilizing influence. Being right makes it worse.
Considering that what we're shooting for on HN is an internet version of reversing the arrow of entropy, i.e. hard, I wish you'd join in with that and help. It would benefit you too, since the community would suck less. Other users have done so. I'm one of them; I used to deliberately mix a little abrasion into my HN comments because I thought they would be lukewarm without it and I value lively language. But that was before I understood the dynamics of a large public forum. A large public forum has to be a bit bland because otherwise the riffraff will ruin it*. Blandness is the price we pay to avoid worse.
Re the current thread? I doubt it makes sense to litigate the details, but FWIW I at most partly agree with the author. I think Lisp metaprogramming has significant advantages, but he overstated his case, and that plus being rude, then lashing out at downvoters, is guaranteed to attract more downvotes. Your comments were less rude and advocated a more conventional view, so it isn't surprising that users preferred them. I mentioned the rudeness on both sides not to equate the two, but to point out that the HN guidelines still apply even when one is being provoked. In fact that's when they apply most. Otherwise everyone can invoke the "I merely" defense and down we all go.
* (Edit: I meant this playfully, but in retrospect it sounds nasty. The point is that the fun kind of abrasive language—pointed, witty sparring—rapidly gets drowned out by blunt crudeness when the group is large.)
I'll give it a try!
(I'm from a place that we like our debates heated and our coffee iced :-)).