Stack Exchange
log in sign up chat discuss faq users badges

Area 51 » Technology

definition commitment beta
208
followers
Share This

13
votes
5
answers

What is a programming language?

may 15 '23 at 0:18 Solomon Ucko 151
5
votes
0
answers

PLDI's current chat room

apr 26 '23 at 19:28 rydwolf 2,339
29
votes
1
answer

Congratulations to Programming Language Design and Implementation on completing the Commitment phase!

apr 26 '23 at 18:03 Deko Revinio 112
9
votes
1
answer

Should we allow questions about other parts of the software toolchain?

mar 20 '23 at 20:47 V2Blast 186
7
votes
3
answers

Will questions about building and maintaining a programming language's community or contributors be allowed?

mar 8 '23 at 15:51 warren 7,721

show 17 more discussions
discuss this proposal

This proposal is now in the Beta phase — example questions are locked!

115 Example Questions (7 closed)

active newest votes
up vote 19 down vote
added by emanresu A Nov 17 '22 at 23:52
link
This seems like a fine question to me, equally subjective as all the other advantages/disadvantages questions here – mousetail Nov 19 '22 at 6:06
2  
What is a character? – user3840170 Nov 19 '22 at 12:13
@user3840170 a single code point. Depending on the language it could be either a ASCII character like "a" or "$" or a Unicode code point. A series of characters is called a string. – mousetail Nov 19 '22 at 12:48
1  
This question is a bit unclear, and could use rewording: Are we talking about making strings a user-facing character array? Or are we talking about the inner guts: using a character array vs byte array internally? – Nathan Merrill Dec 1 '22 at 19:50
5  
If 10 users pulled their upvotes from this question, moving them to others closer to the threshold, the proposal will have a better chance of progressing – warren Jan 20 '23 at 14:42
show 8 more improvement suggestions
up vote 14 down vote
added by Redwolf Programs Nov 17 '22 at 22:59
link
up vote 14 down vote
added by mousetail Nov 18 '22 at 15:49
link
up vote 12 down vote
added by Ginger Nov 17 '22 at 23:01
link
Limiting only to semicolons seems... weird. Potentially could be rephrased to ask about explicit line-ends vs using newlines to end a line to be a more general question – caird coinheringaahing Nov 19 '22 at 2:00
up vote 11 down vote
added by mousetail Nov 18 '22 at 11:26
link
up vote 11 down vote
added by lyxal Nov 18 '22 at 13:40
link
up vote 11 down vote
added by gavinhoward Nov 18 '22 at 15:06
link
up vote 10 down vote
added by Redwolf Programs Nov 17 '22 at 23:00
link
2  
This is a yes/no question. Maybe ask "What are the widespread alternatives to C-style or Python-style code block syntax?" – Adám Nov 21 '22 at 8:29
3  
@Adám list type question, like yes/no ones, are generally bad fits for the SE format – warren Nov 21 '22 at 13:43
@warren area51.meta.stackexchange.com/questions/32832/… – mousetail Nov 21 '22 at 15:27
1  
@mousetail - they"re still generally bad fits for SE sites. Just because there are a couple notable exceptions doesn't change the general rule :) – warren Dec 1 '22 at 13:40
@warren please answer the linked question then, it's a much better place for this discussion than the comments here – mousetail Dec 1 '22 at 13:42
up vote 10 down vote
added by lyxal Nov 17 '22 at 23:01
link
Is this a real question? Or is it a stand in for any number of values it X and Y? – James Risner Nov 22 '22 at 17:46
3  
It is indeed a stand-in for any specific language x and language feature y. – lyxal Nov 22 '22 at 21:42
3  
Only the language creator can really answer this. Everyone else can only speculate. – finnw Nov 22 '22 at 22:56
1  
@warren I see no reason why knowledge from what the designers and implementers of popular languages have said about those languages should be off-limits for a Stack Exchange site meant for sharing knowledge about language design and implementation. The point is that that knowledge can be shared without requiring those specific individuals to write it here themselves. – kaya3 Dec 1 '22 at 20:18
1  
@warren In a trivial, irrelevant sense, you are correct if you also define an answer quoting somebody else as an answer given by that person. But (1) that is just not what "answering a question" means on Stack Exchange (the person who wrote the answer and whose profile name, avatar and reputation appear on that answer is the person who answered the question), and (2) it is totally clear from context that the comment you are defending does not define "answering" in that way, otherwise it would make no sense as an objection to this question belonging on the site. So it seems to me that you ... – kaya3 Dec 5 '22 at 14:14
show 14 more improvement suggestions
up vote 10 down vote
added by Redwolf Programs Nov 17 '22 at 23:01
link
up vote 10 down vote
added by Ginger Nov 17 '22 at 23:04
link
2  
This is a bit vague. I initially read it as discussing different syntax that can be used, but now I read it as having more to do with implementation (e.g., laziness/forking). Which is it? – Redwolf Programs Nov 27 '22 at 4:15
Syntax. I have clarified. – Ginger Nov 30 '22 at 15:12
1  
Would this question be simply looking for examples? Most languages go for a <condition> ? <true> : <false>, <condition> -> <true>, <false>, <condition> : <true> ⋄ <false>, if <condition> then <true> else <false>, <condition> ifTrue: <true> ifFalse: <false> or even WHEN <condition> THEN <true> ELSE <false> construct/variation, with or without fi/END stops, but you can use any characters/order you wish, naturally. What kind of limit is the question looking for? – Mast Dec 14 '22 at 13:05
up vote 10 down vote
added by Olive Nov 17 '22 at 23:27
link
3  
This doesn't seem on-topic. How to implement a compiler for some other pre-existing IR is not programming language design. – curiousdannii Nov 21 '22 at 7:37
12  
but it is part of programming language implementation. note "Proposed Q&A site for designers and implementers..." – Seggan Nov 21 '22 at 15:13
up vote 10 down vote
added by emanresu A Nov 17 '22 at 23:36
link
11  
I'm not sure that I agree this should be closed. SO disallows list questions, sure, but I think this would work pretty well on our site, similar to CGCC's tips questions, which collect large numbers of answers on specific tricks just like this one would – Redwolf Programs Nov 19 '22 at 17:15
up vote 10 down vote
added by emanresu A Nov 18 '22 at 0:08
link
I think most of the close votes on this are misunderstanding the question. It's not asking about implementing "custom"/nonstandard infix operators as a language designer, which could be done a zillion ways, it's talking about custom operators defined by the program itself, which is a more interesting problem and probably one with fewer good answers – Redwolf Programs Jan 30 '23 at 17:39
up vote 10 down vote
added by Original Original Original VI Nov 18 '22 at 1:19
link
up vote 10 down vote
added by Original Original Original VI Nov 18 '22 at 1:28
link
up vote 10 down vote
added by Original Original Original VI Nov 18 '22 at 1:32
link
up vote 10 down vote
added by Bubbler Nov 18 '22 at 1:58
link
3  
This feels a little vague to me (depending on which library you're using for the parser, the solution could vary greatly). Maybe the question could be about writing the BNF for such a language? – Original Original Original VI Nov 18 '22 at 18:32
I think that its called the "off-side" rule :) – TKirishima Nov 18 '22 at 23:08
4  
kaya, it doesn't make the question any less a fit for this site – Seggan Nov 19 '22 at 14:42
up vote 10 down vote
added by Bubbler Nov 18 '22 at 2:12
link
up vote 10 down vote
added by Ginger Nov 18 '22 at 13:21
link
9  
This question, along with a lot of others, would be pretty well served on CS.SE as it is, don't you think? – pxeger Nov 20 '22 at 7:55
up vote 10 down vote
added by lyxal Nov 18 '22 at 13:42
link
1  
Which form of multiple inheritance? A->B->C->D, or A->B, G->H, and (H+B)->Q? – warren Dec 1 '22 at 13:47
@warren I've never seen A->B->C->D referred to as multiple inheritance – Redwolf Programs Jan 10 '23 at 14:24
@RedwolfPrograms - I heard it called that when I first hit OOP back in the 90s. Maybe it isn't still? – warren Jan 10 '23 at 15:22
2  
Aside from terminology, I can't really imagine a reason why supporting A->B->C inheritance requires any special effort once A->B is supported; whereas (A + B)->C does (because of object layout issues). – Anonymous Jan 12 '23 at 19:48
worth noting there's no single correct answer on how to do multiple inheritance in general. and so this question may end up looking more like a [tips] question? – somebody Feb 1 '23 at 6:24
up vote 10 down vote
added by mousetail Nov 18 '22 at 14:09
link
2  
UTF-32 is also an option. – Adám Nov 19 '22 at 18:18
up vote 10 down vote
added by fess Nov 18 '22 at 14:34
link
18  
I think this question would be better phrased as "What are the advantages of types as a first class value" or "what kinds of programming languages would benefit from first class types", right now it's a vague question that opens the way to vague answers. – Pavel Nov 18 '22 at 19:08
3  
@Pavel Also "It's clearly possible to make types first class (e.g. Zig) so what are the pitfalls that prevent it being done more often?" – finnw Nov 23 '22 at 10:52
up vote 10 down vote
added by Jon Purdy Nov 18 '22 at 17:49
link
up vote 10 down vote
added by BoppreH Nov 18 '22 at 18:27
link
up vote 10 down vote
added by BoppreH Nov 18 '22 at 18:42
link
3  
Wait, it does?? – user3840170 Nov 19 '22 at 12:16
3  
@user3840170 By community agreement, yes: nick.groenen.me/posts/rust-error-handling/… – BoppreH Nov 19 '22 at 20:04
up vote 10 down vote
added by BoppreH Nov 18 '22 at 18:54
link
This is essentially the same as this: area51.stackexchange.com/proposals/127456/… – mousetail Nov 19 '22 at 6:33
4  
@mousetail I disagree, the linked question requires having a character type, but having a character type doesn't imply that strings are just arrays. – BoppreH Nov 19 '22 at 20:02
3  
Rust is an example of a language which has separate types for strings and characters, but in which strings are not arrays of characters (they are arrays of bytes, UTF-8 encoded, so each character may be 1-4 bytes). – kaya3 Nov 22 '22 at 7:37
1  
@mousetail I also disagree: implementing a string as an array of "characters" internally doesn't imply that the character type is exposed. – Anonymous Jan 12 '23 at 19:49
1  
@RayButterworth no. For example, in Java, char is a 16-bit unsigned type intended to store a UTF-16 value (code point or half of a surrogate pair).Bytes are not characters, just as data is not text. The question is about the decision made by Java (and many others) to have char exist as an exposed-to-the-user type separate from String, as opposed to the decision made by Python and Javascript (and probably others I can't think of right now) whereby indexing a string results in a string of length 1. – Anonymous Jan 12 '23 at 19:52
show 4 more improvement suggestions
up vote 10 down vote
added by Nathan Merrill Nov 18 '22 at 21:20
link
1  
What is a first-class function? – user3840170 Nov 19 '22 at 13:05
6  
It is a function that can be passed around as data – Seggan Nov 19 '22 at 14:39
This seems a bit vague or unclear. Since it's data, "compiled" sounds off. While it's certainly possible to explain a process for implementing the feature and compiling a language that supports them directly to assembly, it comes across that the person asking might have some misconceptions that prevent clear communication. It would, I suppose, depend on the body of the question. – Anonymous Jan 12 '23 at 19:46
up vote 10 down vote
added by lyxal Nov 19 '22 at 6:46
link
1  
Since this has collected 4 close votes and discussion about "should" questions is ongoing, it might be worth rewording this to focus more on the "why or why not" or "advantages/disadvantages of" – Redwolf Programs Jan 10 '23 at 15:00
1  
@redwolfprograms I've edited it to not use should – lyxal Jan 11 '23 at 3:44
up vote 10 down vote
added by user3840170 Nov 19 '22 at 12:25
link
2  
What kind of scenario is this imagining? – Unrelated String Nov 21 '22 at 7:29
Deleting null pointer checks, code working ‘fine’ at -O0, but not at -O3, compilers disproving Fermat’s last theorem… maybe you, as a language designer, are thinking: welp, C is broken beyond repair, but maybe if I am designing my own language, I can prevent other people from playing word games with my spec. Of course the answer should explain that it is not as simple as a ‘don’t you dare optimize my code’ clause. – user3840170 Nov 21 '22 at 7:58
3  
There is a famous article by Raymond Chen explaining how undefined behaviour can result in "time travel", and there is also the meme which says undefined behaviour gives the compiler permission to make demons fly out of your nose. The idea is that a compiler is free to assume that a program it's compiling will never perform undefined behaviour, even if the compiler can't prove it, and that leads to strange and often undesirable results when the assumption is violated. So the question is how to avoid that. – kaya3 Nov 22 '22 at 7:49
@kaya3 if I remember correctly the C meme about U.B., it says: "it summons demons fly out of your nose, or launch a nuclear missile". I think that depict the whole picture of safety :-) – Stephane Rolland Dec 28 '22 at 13:53
up vote 10 down vote
added by James Risner Nov 20 '22 at 0:39
link
up vote 10 down vote
added by Bubbler Nov 21 '22 at 6:23
link
up vote 10 down vote
added by Agnishom Chattopadhyay Nov 21 '22 at 15:32
link
up vote 10 down vote
added by Unrelated String Nov 22 '22 at 8:44
link
up vote 10 down vote
added by Seggan Nov 22 '22 at 15:24
link
I can only think of three or four; I doubt this question is actually too broad. You've got the "try-throw-catch" family, you've got interrupt-handler-style, you've got (success | failure) sum types, you've got errno… and that covers it. Not a list question. – wizzwizz4 Jan 29 '23 at 19:34
1  
There may be only so many ways to do it, but I think this is still a valuable question for comparing the pros and cons of different approaches. How a language handles errors can greatly impact how people use it, and it may require changing other features to work more smoothly with it. – Original Original Original VI Jan 30 '23 at 3:43
up vote 10 down vote
added by Robert Columbia, edited by warren Dec 1 '22 at 13:45
link
up vote 10 down vote
added by bigyihsuan Dec 5 '22 at 20:55
link
up vote 10 down vote
added by justANewbie Dec 13 '22 at 6:10
link
up vote 10 down vote
added by Andrej Bauer Dec 14 '22 at 18:18
link
up vote 10 down vote
added by ice1000 Dec 15 '22 at 19:22
link
1 2 3 next

This site is in

Public Beta

Anyone can participate!

Sites remain in beta for at least 180 days to build up a critical mass of users, questions, and participation.

proposed by

Redwolf Programs
45k●10●204●508

2 years ago

edited by

warren
110k●100●559●1174

2 years ago

viewed

32,725 times

latest activity

1 year ago

followers

users also following

2.9% Proof Assistants
2.9% Drones and Model...
2.4% Matter Modeling
2.4% Quantum Computing
62.5% only this proposal

followers active in

44.2% Stack Overflow
23.6% Meta Stack Exchange
20.2% Code Golf
19.7% Programming Langu...
19.7% Programming Langu...
17.3% Mathematics

recent followers

added Jun 8 '23 at 10:57
Alok Maity
5,179●4●36●161
added May 15 '23 at 7:01
user223895
51●1
added May 14 '23 at 20:05
user223893
51●1
added May 4 '23 at 21:11
Smitop
9,670●5●33●98
added May 1 '23 at 20:59
user223868
51●1
added Apr 24 '23 at 12:26
Skgland
1,152●13●29
added Apr 18 '23 at 10:08
l0b0
173k●107●703●1206
added Apr 16 '23 at 22:33
skreutzer
51●2
added Apr 16 '23 at 21:04
saintali
5,566●2●34●68
added Apr 16 '23 at 7:03
otesunki
51●2
added Apr 14 '23 at 11:09
TheOnlyTails
51●1
added Apr 13 '23 at 22:31
Matt and Neil
33.3k●7●107●191
added Apr 13 '23 at 20:33
Jasmijn
15.9k●2●53●95
added Apr 13 '23 at 14:18
Mark Glossop
51●1
added Mar 24 '23 at 2:22
Franklin Zhou
51●1
added Mar 1 '23 at 18:27
hazer-hazer
51●1
added Feb 16 '23 at 14:52
The Thonnu
26k●9●43●182
added Feb 13 '23 at 19:25
t0mm13b
50.4k●9●146●222
added Feb 8 '23 at 11:50
Dangeroustuber
51●1
added Feb 5 '23 at 21:50
Michael Kolesidis
759●2●4●22
added Feb 5 '23 at 18:35
124816
51●2
added Feb 5 '23 at 15:43
musiKk
23.2k●6●104●179
added Feb 5 '23 at 10:17
Arduino Sentinel
3,349●24●55
added Feb 3 '23 at 7:11
Maximilian Ballard
1,827●1●19●55
added Feb 1 '23 at 18:37
user223486
51●1
added Feb 1 '23 at 15:24
user223485
51●1
added Feb 1 '23 at 12:23
user223483
51●1
added Jan 31 '23 at 21:06
Mike C
34.7k●15●98●142
added Jan 30 '23 at 10:15
Nimesh Neema ♦ 1
66.7k●34●234●370
added Jan 29 '23 at 19:24
wizzwizz4 ♦ 1
66.7k●20●266●672
added Jan 29 '23 at 9:39
user223477
51●1
added Jan 29 '23 at 6:07
goomba
51●2
added Jan 29 '23 at 0:35
Jacob
15.2k●1●45●146
added Jan 28 '23 at 15:15
Roan
1,367●2●20●36
added Jan 28 '23 at 14:59
user223469
51●1
added Jan 25 '23 at 20:12
taylor.2317
4,286●1●25●136
added Jan 25 '23 at 17:18
warren
110k●100●559●1174
added Jan 24 '23 at 5:06
just Paul
51●1
added Jan 23 '23 at 11:24
user223454
51●1
added Jan 22 '23 at 22:09
Riley Lynch
51●2
feed icon proposal feed
faq | blog | legal | privacy policy | contact us | feedback always welcome
site design / logo © 2025 Stack Exchange Inc; user contributions licensed under cc by-sa; see the licensing help page for more information.
rev 2025.4.17.215