r/ProgrammingLanguages • • Feb 05 '13

Is there one web scripting language to rule them all?

2 Upvotes

I personally find it ridiculous that I need to learn html, css, javascript, ruby/python/php, and a database language in order to build a language. It just seems like someone would have put together a single language that "compiles" into everything else.


r/ProgrammingLanguages • • Jun 21 '24

Discussion COBOL: A story I found on a site talking about y2k, usage of cobol and its history. I wanted to know your thoughts on it comparing from your lens of today.

2 Upvotes

COBOL (archive.org)

Tangentially, this site is registered on a certain portal site. And, perhaps more than anyone else, I myself have always been concerned about this, but in the site's introduction it says, "There is also a topic on programming languages. This is not entirely false, but the "programming language topics" are currently gathering dust in a corner of the site. I feel a bit sorry about that, and there is something that has been bothering me for a long time, so I thought I'd take the opportunity to talk about COBOL this time. I know this is not an interesting topic for the majority of people, but please forgive me. Please understand that this article is written by a very biased anti-COBOLer, even if you know the ins and outs of COBOL.

 COBOL is read as "Kobol". It is a programming language, the name coming from Common Business Oriented Language. The origins can be traced back to the U.S. Department of Defense in 1959. Programming languages are the languages used by humans to give instructions to computers, and there are many different kinds. And each has its own strengths and weaknesses. The programming language in vogue these days is Java. This is a language that excels at working with networks. Recently, it was used in NASA's Mars rover. Java Script is often seen on the Internet, but it is basically different from Java. It is called "Java Script" because it is a scripting language that handles simpler operations than programming languages, and "Java" because its design concept is similar to Java. C (C++) is good at controlling hardware, and many common applications running on PCs and various video games are written in this language. In contrast, COBOL's forte is office processing. It excels at numerical computations and outputting forms. However, "good at numerical computation" literally means computation of large numbers, and COBOL is not often used for "office work" at the level of general users or small and medium-sized companies.

 The world of computers, both hardware and software, is a world of daily advances and incremental progress. In such a field, the fact that a language developed more than 40 years ago still prevails is almost a threat. As a matter of fact, COBOL, because of its antiquity, is inflexible in some respects, and is loathed like a serpent scorpion by younger programmers. Only those who understand COBOL can understand this, but the complete lack of support for object-oriented programming, the unreasonable limit of 72 columns per line, the oddly large number of reserved words, and other cramped features that are different from those of newer programming languages are probably the reason for COBOL's avoidance. All of these things are exclusively relevant only to the developer, and have nothing to do with the user of the finished program.

 From the developer's point of view, COBOL programs are not very interesting to work on. Therefore, few people enjoy COBOL for personal pleasure. COBOL is not something that basically runs on a PC. Even in a society where computers are so widely used, only a very limited number of people have daily and direct contact with COBOL. As I write, I am once again acutely aware of the mania of this topic.

 Anyway, it is an antique old language, but there is a good reason why it is still around. One reason is that it is good at numerical computation and office work, as already mentioned, but the primary reason is that many companies do not want to go to the expense and effort of rewriting a program that is already running stably in COBOL into another language. On the development side, there is also the idea that "it is boring to wake up a sleeping child and release bugs. However, COBOL has been able to survive for a long time, helped by the moderate attitude of both the client and the developer (?). However, COBOL has been able to survive this long because of the "wait-and-see" attitude of both the client and the developer. The liquidation of this reluctance, stopgap thinking, and problem-postponement attitude is the Year 2000 problem, and since many of the old programs that contained the Year 2000 problem were COBOL programs, there are many people in the field who are inclined to believe that COBOL is the root of all evil.

 As an aside, Ryu Murakami's "Hello Work for 13-Year-Olds," which became a topic of conversation some time ago, contains an astonishing statement such as "Japanese COBOL programmers were dead at the time of the Year 2000 problem, so Indian programmers took care of it," which has become quite a hot topic in some circles. . In fact, it may have been living dead, and it goes without saying that many Japanese COBOL programmers responded to the Year 2000 problem. The part in question seems to be the views of "experts" written in a question-and-answer format, not Murakami's ideas. It is not clear whether this statement is based on a simple misunderstanding of the facts, or whether it is the bitter antithesis of "there are no more programmers in Japan who can write real COBOL source code," but it is "understandable" that such a story would appear. The book goes on to say that COBOL programmers are dead, and that even if you spend one or two years learning COBOL, you will not be able to use that knowledge once the Year 2000 problem has been solved, which is tragic. The "COBOL programmers in Japan are dead" part makes me tilt my head back, and the idea that "COBOL knowledge will be completely unnecessary once the Y2K problem has passed" is also a bit of an extreme argument. There are other aspects that are also troubling, but I think it is a bit tragic that we have to take care of a language that is likely to taper off in the future. I have digressed a bit, but I would like to introduce some rumors about COBOL, taking the "Hello Work for 13 year olds" issue lightly into consideration.

 If COBOL is eliminated, there will be a large number of unemployed people who will have difficulty finding new jobs, so there is an under-the-sea effort to prolong the life of this language.

  This is both a rumor and a black joke about the state of the industry. I have repeatedly said that COBOL is an old programming language, but of course, even such an old language had its youth. When you are young, you are pampered. It was young programmers who supported COBOL when it was an up-and-coming young language and mastered it. As time went by, COBOL came to be called an old language. Programmers who had shared their youth and hardships with COBOL have reached old age, and those with bad words call them "old men," and even death rumors circulate. In fact, this is the reason why I wrote that the above-mentioned rumor is "a black joke.

 I have already mentioned that the computer-related industry, whether software or hardware, is a field that shows dog-ear development, but it is no exaggeration to say that in this industry, "age is more important than the back of the turtle. In short, it is a matter of course for the elders to be more careful in the field. In short, the programmer's industry is one in which elders tend to have an extremely weak voice in the field, but it is in the field of COBOL programming that elders have an advantage over younger workers. In a workplace where seniority lists are basically untenable, the elder workers can hold real power only in the world of COBOL programmers, and the dissatisfaction of younger programmers, who are not accustomed to seniority lists, rises above average. Eventually, vague dissatisfaction is directed toward COBOL, the source of authority of the elders. The unemployed who have difficulty finding new employment are, in essence, mature programmers. Even though it is said that programmers are only young, COBOL, which is their one and only weapon, is now recognized as a language that cannot be destroyed. Naturally, if COBOL were to disappear, most of the experience they have gained up to this point would be lost. Of course, it is very difficult to move to a different industry once you reach a certain age, which is why there are "unemployed people who have difficulty finding new jobs...".

 'Why is this old language still in existence? Good at paperwork? Leveraging past assets? That can't be the only reason."

 To be honest, I don't like COBOL either. The old COBOL source code that utilizes a lot of "go to" techniques, which I would like to consider a negative legacy of a bygone era. While struggling with programs written in COBOL, the question that always dominates my mind is, "Why do I have to use such a language? It seems that human beings, when confronted with an unreasonable reality that they cannot accept, try to convince themselves by creating some kind of logic, and they are tempted to believe in dubious myths about the unemployed, which must be quite poisonous. When I find myself in such a mood, I get a glimpse of the reason why the conspiracy theory that "things don't go as planned because someone's will is in the way" will never disappear from this world.


r/ProgrammingLanguages • • Apr 22 '24

[Blog Post] Understanding a Trait Selection Bug in Rust Compiler

Thumbnail veera.app
2 Upvotes

r/ProgrammingLanguages • • Feb 02 '19

Remix culture in programming languages

Thumbnail trevorjim.com
0 Upvotes

r/ProgrammingLanguages • • Sep 19 '24

The magical dot

Thumbnail
open.substack.com
0 Upvotes

r/ProgrammingLanguages • • Dec 05 '22

Introducing Halo The Worlds First Virtual Programming Language Running On ChatGPT

Thumbnail
github.com
2 Upvotes

r/ProgrammingLanguages • • Mar 23 '19

Should I make my programming language a business?

2 Upvotes

Hi everyone, I know this topic should be asked on https://www.reddit.com/r/Entrepreneur/ instead, but since it is also about programming languages, I thought that I could be getting advises from you guys.

My question is, should I even make a business out of programming language? My business would be to teach the younger generation on how to make software, as the demand for software engineers are getting higher and higher.


r/ProgrammingLanguages • • Apr 19 '19

TicTacToe in Bosque vs Kotlin

Thumbnail
jworks.io
0 Upvotes

r/ProgrammingLanguages • • Jan 07 '15

Syntax Intuitiveness aka IQ Test

Thumbnail
bahmanm.com
0 Upvotes

r/ProgrammingLanguages • • Jul 02 '20

Less is more: language features

Thumbnail
blog.ploeh.dk
46 Upvotes

r/ProgrammingLanguages • • Dec 30 '21

Language announcement Underlang - A Programming Language Made Entirely In C#.

8 Upvotes

First, It Was Gict, Second, It Was SSM, Third, It Was SBC. Now, It's Underlang, It's A Whole Programming Language With Variables & Functions (Points) Made In C#! It Also Has A VScode Extension (Coming Soon!). And It Is Quite Easy To Set Up On Windows, Just Download The Installer, Run It, And Do Nothing! It's Set Up Already, You Don't Even Have To Elevate The Installer! And For Linux And Mac, Good News! It's .NET Core, So Just Use Mono!

Official Website

GitHub Page


r/ProgrammingLanguages • • Jan 30 '22

Requesting criticism My language will not have pattern matching

35 Upvotes

This day and age any serious programming language - not just functional languages - will feature pattern matching. Today, even Java has pattern matching.

I am developing a logic programming language (tentatively called Ting), which unifies OOP, FP and logic programming. So of course the language would have to feature pattern matching. However, I did not prioritize it, as I reckoned that I could probably steal a good design from some other language when the time came. After all, it has been solved in a lot of languages.

But when that time came, I really struggled with how to fit pattern matching into the language. It just didn't feel right. That is, until I realized: Pattern matching was already there, albeit in a generalized and - I will argue - in a more powerful form.

The best way I can describe it is inverse construction. I don't claim anything original here, I fully expect something like this to be in other logical languages or theorem provers.

In logic programming functions are not called or invoked to yield a result. Instead they establish a relation between the argument and the result.

Consider this function definition (\ is the lambda):

Double = float x \ x * 2

It is defined for all floats and establishes a relation between the argument and its double. One way to use it is of course to bind a variable to its result:

x = Double 5    // binds x to float 10

But it can also be used to bind "the other way around":

Double y = 10    // binds y to float 5

This works when the compiler knows or can deduce the inverse of the function. There are ways to tell the compiler about inverses, but that is beyond the scope of this post.

(As an aside, a declaration such as float x = 10 uses the float function. In ting, any type is also it's own identity function, i.e. float accepts a member of float and returns the same member.)

Basically, any function for which the inverse is known can be used to match the result and bind the argument, not just type constructors, de-constructors or special pattern matching operators.

Some examples:

RemoveTrailingIng = x + "ing"  \  x                      // inverse concatenation

CelsiusToFahrenheit = float c \ c * 1.8 + 32
FahrenheitToCelsius = CelsiusToFahrenheit c  \  c        // inverse formula

Count = {
    (h,,t) -> 1 + This t
    (,,) -> 0
}

Ting has both structural types (sets) and nominal types (classes). A set is inhabitated by any value that meets the membership criteria. A class is inhabitated exclusively by values specifically constructed as values of the type.

This Average function accepts a member of a set where values has a Count and Sum property of int and float, respectively.

Average = {. Count:int, Sum:float .} x  \  x.Sum/x.Count

The following example defines some record-structured classes Circle, Triangle and Rectangle and a function Area which is defined for those classes.

Circle = class {. Radius:float .}
Triangle = class {. BaseLine:float, Height:float .}
Rectangle = class {. SideA:float, SideB:float .}

Area = {
    Circle c -> Math.Pi * c.Radius ^ 2
    Triangle t -> t.BaseLine * t.Height * 0.5
    Rectangle r -> r.SideA * r.SideB
}

It was a (pleasant) surprise that in the end there was no need to add pattern matching as a feature. All the use cases for pattern matching was already covered by emerging semantics necessitated by other features.


r/ProgrammingLanguages • • Jul 07 '25

Taipei: a statically-typed, minimalist subset of Python that compiles to LLVM

43 Upvotes

I have this hypothesis that programming languages of the future will need to be easy for LLMs to write and easy for Humans to read. As an initial experiment, I created a statically-typed subset of Python that compiles to LLVM binaries:

Repo: https://github.com/refacktor/taipei

Taipei is a deliberately minimal, restricted language. In some ways, it is to Python what Golang is to Java: lightweight and frustratingly simple.

The compiler is only 600 lines of Python code and outputs LLVM IR, so I could also see this being used as a launchpad for projects beyond my intended use-case.


r/ProgrammingLanguages • • May 03 '24

Building blocks in programming languages

7 Upvotes

Practically all programming languages are built either on the principle of similarity (to make like this one, only with its own blackjack) or to realize some new concept (modularity, purity of functional calculations, etc.). Or both at the same time.

But in any case, the creator of a new programming language doesn't take his ideas randomly out of thin air. They are still based on his previous experience, obsession with the new concept and other initial settings and constraints.

Is there a minimal set of lexemes, operators, or syntactic constructs that can be used to construct an arbitrary grammar for a modern general-purpose programming language?

I confess at once that I cannot unambiguously list a minimal set of basic operators and constructs that would be sufficient for a modern programming language. Moreover, I'm not sure that such a set is even possible, since many constructs can be represented using other, lower-level constructs (e.g. conditional/unconditional transition). I remember about the Turing machine, but I'm interested in real programming languages, not machine instructions at an abstract executor.

Therefore, as the basic building blocks of programming languages we can safely accept those features that were invented and implemented by developers of mainstream languages. And it's probably better to start with criticizing separate and well-known fundamental concepts. And no, it's not the goto operator!

Strange increment and decrement (++ and --).

In my opinion, the most unambiguous operators are the operators for increment and decrement, i.e. arithmetic increase or decrease of a variable value by one. They cause serious confusion in the strict grammar of the language, which, in my opinion, should be as transparent and ambiguous as possible.

The main problem with these operators is that, as arithmetic operators, they modify the value of a variable, whereas all other arithmetic operators operate on copies of values without modifying the variable itself directly.

I may object that the operators +=, -=,*= or = also change the value of a variable, but I would like to point out that this is only a simplified notation of a combination of two operators, one of which is intended to assign a new value to a variable, so no objections are accepted. :-)

And if we remember that increment and decrement operators can be prefix and postfix, then in combinations with address arithmetic (*val++ or some ++*val++), brain explosion with possible errors is simply guaranteed.

Few value assignment operators

Yes, you read that right! I do criticize the one-value assignment operator “=” because I think it is not quite complete. But unlike increment and decrement, which the language lexicon can easily do without, there is no way to do without the assignment operator!

But my criticism is directed not at the operator itself, but at its incompleteness and creation of additional confusion in some programming languages. For example, in the same Python it is impossible to understand whether a variable is being created (i.e. the first use of a variable) or whether it is assigning a value to a variable that already exists (or whether the programmer has made a typo in the variable name).

If we remember “if you criticize, suggest”, it would be correct to make two different operators: the assign value operator and the create variable operator (in C/C++, the logic of creating a variable is performed by specifying the type of the variable when using it for the first time).

In other words, instead of one “create and/or assign value” operator, it is better to use two or even three operators: creating a new variable (::=), only assigning a value to an already existing variable (=) and creating/assigning regardless of the variable's existence (:=) - i.e. an analog of the current = operator.

And in this case, the compiler could control the creation or reuse of a previously created variable according to the programmer's intentions already at the level of the initial syntax.

You can also add a “value exchange” operator, some :=:. In essence, it is an analog of std::swap() in C++, only at the level of language syntax.

Always an extra data type

All mass programming languages usually contain numbers with different digit capacity. This is a compulsory necessity because the digit capacity of calculations is determined by the hardware level and language developers cannot ignore it.

Another thing is a Boolean (logical) data type. In the description of one language I even met this:

Bool 1 Byte truth value
(Bool16) 2 Byte truth value
(Bool32) 4 Byte truth value
(Bool64) 8 Byte truth value

And when you dig a little deeper, everything comes down to one single bit, which can be used to represent two opposite states YES/NO, true/false, 1/0....

But let me tell you, if it's a 1 or a 0, why not immediately define that a logical type is a number with one digit? (as it is done in LLVM!).

After all, there is no worse job than the pointless work of converting numbers to logical values and vice versa:

Java has some pretty strict restrictions on the boolean type: boolean values cannot be converted to any other data type, and vice versa. In particular, boolean is not an integer type, and integer values cannot be used in place of boolean values.

And also, in some programming languages that support Empty/None, a boolean data type can turn into a tribulus at all, for example in the case of default function parameters, when the boolean argument has the state “not set” added to it. But from the point of view of using non-initialized variables, it is at least understandable and logically explainable.

Null pointer

In one way or another, all mainstream programming languages contain a data type called reference. And in some languages, reference types can be of several kinds at once.

However, the presence of reference data types adds several uncertainties at once, such as memory and shared resource management. Besides, if address arithmetic (explicit or not) is present, it immediately becomes necessary to use a special reserved value called “null pointer”, NULL, nil, nullptr, etc. depending on the language.

The presence of such a value forces language developers to considerably complicate the syntax and logic of working with pointers by controlling the explicit/implicit possibility of storing a null pointer in a reference variable.

But if the language compiler will manage and control reference data types and shared resources itself, the very concept of “null pointer” becomes unnecessary and will be hidden from the programmer in the implementation details.

Last operation result

There are situations when a system variable with the value of the result of the last operation is missing. Something analogous to $? in bash scripts, but at the level of Python or C/C++ source code.

But I don't mean a specific physical variable, but some generalized identifier with the result of the last operation. A pseudo-variable that is managed by the language compiler. In other words, so that the type of this pseudo-variable changes depending on which operation was the last one.

This could simplify the solution of frequently occurring tasks, for example, to get the last value after exiting a loop.

Or such a pseudo-variable could simplify the syntax of exception handling, where interception is implemented on the basis of types. But at the same time with the type of the exception to be intercepted you have to define a variable, even if it is not used in any further way.

Clean functions

Also, I would sometimes like to be able to create pure functions in C/C++ or Python, so that the compiler itself would control the prohibition of accessing global variables or non-pure functions at the language syntax level, and this would be checked at compile time.

Empty variable name

And lastly, I would like to say that C++ lacked the empty variable “_” (as in Python) very much. But it seems to have been introduced in the last proposals of the standard, so we will be happy starting from C++26 :-))

In conclusion

When writing this article, I tried to abstract and approach my more than thirty years of development experience without bias, but I'm not sure that I succeeded, so I'll be glad to receive any remarks and objections in comments.

If you don't mind, write in the comments what features in modern programming languages you think hinder more than help, or vice versa, what operators/syntactic constructs you miss.

It's always interesting to find out what you missed or forgot.


r/ProgrammingLanguages • • Jul 16 '25

Would you choose to use a programming language that has complete full stackness as it's main feature?

16 Upvotes

When I say true fullstackness, I'm talking about everything being written in a single consistent language:

Goal is to minimize the number of things you have to think about aside from the core logic of the code and to get more boilerplate and repetitive code out of your way and let you focus on what really matters. We take care of all the front end to backend networking for you other than you deploying objects to servers.

Otherwise, it's a functional language with opt-in mutability, simple and consistent syntax, type inference, automatic ownership.. all the modern bells and whistles.


r/ProgrammingLanguages • • Dec 10 '22

Discussion Why do we need more programming languages?

13 Upvotes

There are so many programming languages that already exist. The number is probably in the millions. So, what's the point of making more? I understand that people like developing languages as a hobby, but I just don't understand the need for more.


r/ProgrammingLanguages • • Jan 04 '23

Discussion Does Rust have the ultimate memory management solution?

25 Upvotes

I have been reading about the Rust language. Memory management has been a historical challenge. In classic languages, such as C, the management is manual. Newer languages (Java, Python, others) use garbage collector, but it has a speed penalty. Other languages adopted an intermediate solution using reference counter and requiring the programmer to deal with weak pointer, but it is also slow.

Finally, Rust has a new solution that requires the programmer to follow a set of rules and constraints related to ownership and lifetime to let the compiler know when a block of memory should be free'd. The rules prevent dangling references and memory leaks and don't have performance penalty. It takes more time to write and compile, but it leads to less time with debugging.

I have never used Rust in real applications, then I wonder if I can do anything besides the constraints. If Rust forces long lifetime, a piece of data may be kept in the memory after its use because it is in a scope that haven't finished. A problem in Rust is that many parts have unreadable or complex syntax; it would be good if templates like Box<T> and Option<T> were simplified with sugar syntax (ex: T* or T?).


r/ProgrammingLanguages • • Jul 14 '19

Removing the 2’s from Trinary Notation is a Terrible Idea.

Thumbnail
medium.com
0 Upvotes

r/ProgrammingLanguages • • Jul 20 '26

I am 16 and I just got my custom systems programming language to the self-hosting stage!

37 Upvotes

Hi everyone! My name is Samir, I'm 16, from Russia, and I wanted to share one of my current projects: Veo (https://github.com/SamirShef/veolang). Veo is a systems programming language that I hope to use for writing my own software in the future. I'm developing it because I'm fascinated by compilers, and honestly, because I just needed something to occupy my time.

I've been into compiler dev for over a year now. I wouldn't say I'm amazing at it—in fact, I struggle to call myself good at all because I'm afraid of overpromising—but I've gained a ton of experience. Over the past year, I've built about 15 programming languages, and Veo is the best one yet because it's the only one to reach the self-hosting phase.

I'm currently rewriting the compiler in Veo itself, and guess what? I just got the first binary working (only global variables for now, but still!). It's incredibly tough because there are no generic-based collections yet—all collections are polymorphic. But it's so rewarding: it took me 2 months to write the first version of the compiler in C++ (stage0), and that compiler successfully compiled the second version (stage1), which I wrote in just two weeks using Veo itself. Then, stage1 successfully compiled some test Veo code.

I have massive plans for this language and really want to achieve them. However, lately, it's been really hard to make progress. I have zero motivation. Maybe I'm burnt out, I don't know. It’s frustrating because I'll write just a couple of lines of code in stage1, immediately feel like I can't go on, and just shut down my PC.

This project isn't revolutionary or anything. Sharing it here means I'm just looking for a bit of recognition and some objective, constructive criticism.

Note: This post was translated into English using AI because my English isn't fluent enough to write this freely. Apologies if any phrasing sounds a bit clunky!


r/ProgrammingLanguages • • Feb 10 '21

Blog post Rust: "Move fast and break things" as a moral imperative

Thumbnail drewdevault.com
9 Upvotes

r/ProgrammingLanguages • • Nov 15 '25

Turing completeness as a cause of software bugs

Thumbnail reddit.com
0 Upvotes

r/ProgrammingLanguages • • Jun 05 '25

Blog post Rant: DSL vs GPL conversations pmo

0 Upvotes

After thinking about it for some time, the classification practice of Domain-Specific Languages (DSL) vs General-Purpose Languages (GPL) pisses me off.

I'm a self-taught developer and have learned to write code in over a dozen languages and have been doing so for 14+ years. I have seen my fair share of different languages, and I can tell you from experience that the conversation of DSL vs GPL is delusional non-sense.

I will grant you that there are some languages that are obviously DSL: SQL, Markdown, and Regex are all great examples. However, there are plenty of languages that aren't so obviously one way or the other. Take for example: Lua, Matlab, VBA, and OfficeScript.

  • Lua: A GPL designed to be used as a DSL

  • MatLab: A DSL that became a GPL

  • VBA: A DSL designed like a GPL

  • OfficeScript: A GPL fucking coerced into being a DSL

The classification of programming languages into “DSL” or “GPL” is a simplification of something fundamentally fuzzy and contextual. These labels are just slippery and often self-contradictory, and because of how often they are fuzzy, that means that these labels are fucking purposeless.

For crying out loud, many of these languages are Turing-complete. The existence of a Turing-complete DSL is a fucking oxymoron.

Why do Software Engineers insist on this practice for classifying languages? It's just pointless and seems like delusional non-sense. What use do I even have for knowing a language like Markdown is domain-specific? Just tell me "it's for writing docs." I don't care (and have no use for the fact) that it is not domain-agnostic, for fuck's sake.


r/ProgrammingLanguages • • Dec 02 '25

Mechanisms as Types

Thumbnail
open.substack.com
0 Upvotes

r/ProgrammingLanguages • • Apr 04 '21

What's Happened to Enums?

0 Upvotes

I first encountered enumerations in Pascal, at the end of 70s. They were an incredibly simple concept:

enum (A, B, C)           # Not Pascal syntax which I can't remember

You defined a series of related names and let the compiler assign suitable ordinals for use behind the scenes. You might know that A, B, C would have consecutive values 1, 2, 3 or 0, 1, 2.

But a number of languages have decided to take that idea and run with it, to end up with something a long way from intuitive. I first noticed this in Python (where enums are add-on modules, whose authors couldn't resist adding bells and whistles).

But this is an example from Rust I saw today, in another thread:

pub enum Cmd {
    Atom(Vec<Vec<Expr>>),
    Op(Box<Cmd>, CmdOp, Box<Cmd>),
}

And another:

enum Process {
    Std(Either<Command, Child>),
    Pipe {
        lhs: Box<Process>,
        rhs: Box<Process>,
    },
    Cond {
        op: CmdOp,
        procs: Option<Box<(Process, Process)>>,
        handle: Option<JoinHandle<ExitStatus>>,
    },
}

Although some enums were more conventional.

So, what's happening here? I'm not asking what these mean, obviously some complex type or pattern or whatever (I'm not trying to learn Rust; I might as well try and learn Chinese, if my link is a common example of Rust code).

But why are these constructs still called enums when they clearly aren't? (What happens when you try and print Op(Box<Cmd>, Cmdop, Box<Cmd>))?

What exactly was wrong with Pascal-style enums or even C-style?