Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: July 29, 2025, 1:26 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom error message for stack overflow in C++
#42
RE: Custom error message for stack overflow in C++
(September 16, 2021 at 2:22 pm)HappySkeptic Wrote:
(September 16, 2021 at 2:16 pm)FlatAssembler Wrote: What do you guys here think about using `?:` in lvalues, that is, on the left-hand-side of the assignment operator? I have added support for that to my programming language: https://flatassembler.github.io/AEC_spec...l_operator

I don't like using a ternary operator in an lvalue.  It makes the code hard to read, and I rarely encounter a situation where it would be useful.

I don't know if it makes code significantly harder to read than ternary operators in expressions do. Do you think it does? Ternary operators in expressions, if used improperly, can make the code significantly harder to read, but that is not a reason for a language not to support them.

By the way, what do you think about what I wrote today in the introduction to the documentation for my programming language:
https://flatassembler.github.io/AEC_spec...troduction Wrote:I have also always been interested in languages, both natural and artificial (such as programming languages), and making a programming language will certainly give me a lot better insight into how programming languages really work. That is not quite true for natural languages: if you try to make your own constructed language to be spoken by humans (similar to Esperanto), and you do not know about consecutio temporum, you will most likely not specify how consecutio temporum is supposed to work in your language and you will probably not even realize your grammar has a hole in its specification (you will assume it is understood by itself it will be done the same way as in your native language, thinking, like I used to think before learning about consecutio temporum in English, that the way tenses are put together in complex sentences in your native language is based on logic, rather than that the rules for that are essentially-arbitrary). But it is true that making a programming language gives you a special insight into how programming languages, and computers in general, work. Especially if you are writing everything yourself (like I am doing), rather than using frameworks for tokenizing, parsing and compiling.
Reply



Messages In This Thread
RE: Custom error message for stack overflow in C++ - by FlatAssembler - September 16, 2021 at 5:55 pm

Possibly Related Threads...
Thread Author Replies Views Last Post
  What is the most absurd error message a program you have made was outputting? FlatAssembler 38 8497 June 14, 2023 at 8:01 am
Last Post: FlatAssembler
  Error 502 bad gateway for Rational Responders Brian37 13 2395 April 23, 2022 at 4:17 pm
Last Post: BrianSoddingBoru4
  How Do I Send an SMS message From UK mobile to a US one ReptilianPeon 11 2671 July 9, 2018 at 5:17 pm
Last Post: bennyboy
  HELPPPPP Blue screen error just now!!! Edwardo Piet 114 15924 November 10, 2015 at 2:26 am
Last Post: Aractus
  Disk read error. Creed of Heresy 12 4711 July 27, 2012 at 9:19 am
Last Post: Tiberius
  Video Error: Grey circle with a white exclaimation mark inside. Reforged 5 4343 July 5, 2012 at 1:19 am
Last Post: Reforged



Users browsing this thread: 2 Guest(s)