Were are C++ templates inside of the lambda cube?
$begingroup$
I originally posted this to Stack Overflow but they referred me over to here, so I'm going to become really angry if everyone here tell me that this question is better suited for Stack Overflow.
C++ templates have type variables and can express lambdas, so they must have System F embedded. But is that exactly where they are located in the lambda cube? Can C++ templates produce new types or express dependent types?
dependent-types c++ calculus-of-constructions
$endgroup$
add a comment |
$begingroup$
I originally posted this to Stack Overflow but they referred me over to here, so I'm going to become really angry if everyone here tell me that this question is better suited for Stack Overflow.
C++ templates have type variables and can express lambdas, so they must have System F embedded. But is that exactly where they are located in the lambda cube? Can C++ templates produce new types or express dependent types?
dependent-types c++ calculus-of-constructions
$endgroup$
add a comment |
$begingroup$
I originally posted this to Stack Overflow but they referred me over to here, so I'm going to become really angry if everyone here tell me that this question is better suited for Stack Overflow.
C++ templates have type variables and can express lambdas, so they must have System F embedded. But is that exactly where they are located in the lambda cube? Can C++ templates produce new types or express dependent types?
dependent-types c++ calculus-of-constructions
$endgroup$
I originally posted this to Stack Overflow but they referred me over to here, so I'm going to become really angry if everyone here tell me that this question is better suited for Stack Overflow.
C++ templates have type variables and can express lambdas, so they must have System F embedded. But is that exactly where they are located in the lambda cube? Can C++ templates produce new types or express dependent types?
dependent-types c++ calculus-of-constructions
dependent-types c++ calculus-of-constructions
asked 4 hours ago
Tomislav OstojichTomislav Ostojich
1634
1634
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
But is that exactly where they are located in the lambda cube?
The lambda cube is not a giant spectrum on which all programming languages can be classified. It is precisely eight languages, which combine a lambda calculus (values abstracted over values) with all possible combinations of three features:
- Values abstracted over types (parametric polymorphism)
- Types abstracted over types (kinds / type constructors)
- Types abstracted over values (dependent types)
So, the C++ template language isn't anywhere on the lambda cube, since it isn't any of those 8 languages.
The second thing to keep in mind is that we can't mix up C++ features and C++ template features. Just because C++ has lambdas, this doesn't (necessarily) mean that its template language has them.
It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure.
$endgroup$
$begingroup$
"It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure." This is the question I meant to ask! And thank you for providing an answer in the form of a demonstration/proof.
$endgroup$
– Tomislav Ostojich
40 mins ago
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "419"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f103401%2fwere-are-c-templates-inside-of-the-lambda-cube%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
But is that exactly where they are located in the lambda cube?
The lambda cube is not a giant spectrum on which all programming languages can be classified. It is precisely eight languages, which combine a lambda calculus (values abstracted over values) with all possible combinations of three features:
- Values abstracted over types (parametric polymorphism)
- Types abstracted over types (kinds / type constructors)
- Types abstracted over values (dependent types)
So, the C++ template language isn't anywhere on the lambda cube, since it isn't any of those 8 languages.
The second thing to keep in mind is that we can't mix up C++ features and C++ template features. Just because C++ has lambdas, this doesn't (necessarily) mean that its template language has them.
It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure.
$endgroup$
$begingroup$
"It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure." This is the question I meant to ask! And thank you for providing an answer in the form of a demonstration/proof.
$endgroup$
– Tomislav Ostojich
40 mins ago
add a comment |
$begingroup$
But is that exactly where they are located in the lambda cube?
The lambda cube is not a giant spectrum on which all programming languages can be classified. It is precisely eight languages, which combine a lambda calculus (values abstracted over values) with all possible combinations of three features:
- Values abstracted over types (parametric polymorphism)
- Types abstracted over types (kinds / type constructors)
- Types abstracted over values (dependent types)
So, the C++ template language isn't anywhere on the lambda cube, since it isn't any of those 8 languages.
The second thing to keep in mind is that we can't mix up C++ features and C++ template features. Just because C++ has lambdas, this doesn't (necessarily) mean that its template language has them.
It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure.
$endgroup$
$begingroup$
"It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure." This is the question I meant to ask! And thank you for providing an answer in the form of a demonstration/proof.
$endgroup$
– Tomislav Ostojich
40 mins ago
add a comment |
$begingroup$
But is that exactly where they are located in the lambda cube?
The lambda cube is not a giant spectrum on which all programming languages can be classified. It is precisely eight languages, which combine a lambda calculus (values abstracted over values) with all possible combinations of three features:
- Values abstracted over types (parametric polymorphism)
- Types abstracted over types (kinds / type constructors)
- Types abstracted over values (dependent types)
So, the C++ template language isn't anywhere on the lambda cube, since it isn't any of those 8 languages.
The second thing to keep in mind is that we can't mix up C++ features and C++ template features. Just because C++ has lambdas, this doesn't (necessarily) mean that its template language has them.
It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure.
$endgroup$
But is that exactly where they are located in the lambda cube?
The lambda cube is not a giant spectrum on which all programming languages can be classified. It is precisely eight languages, which combine a lambda calculus (values abstracted over values) with all possible combinations of three features:
- Values abstracted over types (parametric polymorphism)
- Types abstracted over types (kinds / type constructors)
- Types abstracted over values (dependent types)
So, the C++ template language isn't anywhere on the lambda cube, since it isn't any of those 8 languages.
The second thing to keep in mind is that we can't mix up C++ features and C++ template features. Just because C++ has lambdas, this doesn't (necessarily) mean that its template language has them.
It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure.
answered 2 hours ago
jmitejmite
22.5k34497
22.5k34497
$begingroup$
"It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure." This is the question I meant to ask! And thank you for providing an answer in the form of a demonstration/proof.
$endgroup$
– Tomislav Ostojich
40 mins ago
add a comment |
$begingroup$
"It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure." This is the question I meant to ask! And thank you for providing an answer in the form of a demonstration/proof.
$endgroup$
– Tomislav Ostojich
40 mins ago
$begingroup$
"It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure." This is the question I meant to ask! And thank you for providing an answer in the form of a demonstration/proof.
$endgroup$
– Tomislav Ostojich
40 mins ago
$begingroup$
"It is possible to ask, which of the three lambda-cube features does C++ have? It would seem that it features the full power of the lambda cube, but I'm not enough of a C++ expert to know for sure." This is the question I meant to ask! And thank you for providing an answer in the form of a demonstration/proof.
$endgroup$
– Tomislav Ostojich
40 mins ago
add a comment |
Thanks for contributing an answer to Computer Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f103401%2fwere-are-c-templates-inside-of-the-lambda-cube%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown