7
$\begingroup$

Right now, the question "What is implied by the names 'sum type' and 'product type'?" is closed for being off-topic, but the help center doesn't specify what is on-topic for PLDI.

The question is not directly about how to design or implement a programming language, but it's about terminology commonly used when talking about programming languages. I and many people have been puzzled by the "sum type" and "product type" terminology upon first encountering it. Googling turns up answers, but I'm not sure it turns up a clear, StackExchange-style good answer to precisely this question.

One could argue that the question is about types, not programming languages, but types are a central idea in programming languages. One could argue that it's about etymology, not the topic itself, but knowing etymology is often a helpful part of understanding the terminology and even the topic itself.

What are your thoughts on how to draw the line around the allowed scope for terminology questions?

$\endgroup$
3
  • 1
    $\begingroup$ The author VTCed it? $\endgroup$
    – Starship
    Commented May 19, 2023 at 16:42
  • $\begingroup$ @Starshipisgoforlaunch that's quite common yes $\endgroup$ Commented May 19, 2023 at 17:29
  • 1
    $\begingroup$ You may realize the close voters are right yourself, or you may just want a little time to edit your answer in peace $\endgroup$ Commented May 19, 2023 at 18:45

2 Answers 2

5
$\begingroup$

I think it would be valuable to have Q&A covering the breadth of the field of PL design as it has already been happening and can be seen in existing languages. Breadth includes similarities and differences between how different languages refer to similar things (I.e. terminology).

For example, both JavaScript and Java have what they call "Primitives" (see ECMAScript's ToPrimitive, and JLS Primitive Types). But what might be considered similar / analogous in C++ are called "Fundamental Types", and then in C there are "Arithmetic Types", and then you realize C++ has a concept (pun intended) of is_arithmetic. It's messy because to do Q&A about these things without being shallow, you'd really need to get slightly into other aspects of the languages (Ex. their type system and other related mechanics, what form their code is in when passed to whatever reads it, and the language's overarching goals).

Why do I think there is value hiding in all that messy and colourful variety and deceptively shallow-appearing water? Because I think there is value in learning how the world is bigger than you might have realized- especially for people newer to the field (that applies to a lot of things really, like the value from travelling to different countries and seeing what their cultures are like).

And that value pays. It pays in the form of knowing how to communicate in a way that is not ambiguous to people who come from different backgrounds to you. And that's directly applicable here where clarity matters (Ex. this).

The really tricky thing here I think will be how we can control focus of Q&A, and design questions that are well-scoped while still being meaningful and "solving real problems". I don't have thoughts on tips/solutions for this right now. Maybe I will later.

Just to give an example from myself of an answer putting a bit of a spotlight on how different languages refer to similar concepts with different words, see https://languagedesign.stackexchange.com/a/875/251


In terms of your specific example,

One could argue that the question is about types, not programming languages, but types are a central idea in programming languages.

Yes. And I think a question about terminology related to types could/would be valuable (and if reasonably well-scoped, worth counting as on-topic) for the reasons I stated above.

One could argue that it's about etymology, not the topic itself, but knowing etymology is often a helpful part of understanding the terminology and even the topic itself.

Think about it this way: Would the experts on english.stackexchange.com be more likely to give a suitable answer to the question with respect to PL Design and Implementation? I think for some topics like the one you've shown, an expert in the field of PL design is more likely to have the relevant subject-matter-expertise to give an answer to the question with respect to PL design (kind of a vapid statement; sorry, but sometimes when one leads a question in a certain way, that's what happens).

$\endgroup$
2
$\begingroup$

This is one of the few questions that I find suitable for Stack Exchange. At least it's not about opinions.

One could argue that the question is about types, not programming languages, but types are a central idea in programming languages.

Strongly agree. Up to now, most of the questions about types are not well-received on this website.

If you're interested in type systems and type theories, I recommend going to pase, which is closer to StackOverflow or cs or cstheory style.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .