News for hackers. Stuff that matters.
Re:Ladybird: Closing this as we are no longer pursuing Swift... by grey-area on Thursday February 19, 2026 @03:54AM (#47071547)
Not sure how I feel about Shakespeare and JK Rowling living in the same parenthesis!

Computer languages are the opposite of natural languages - they are for formalising and limiting thought, the exact opposite of literature. These two things are not comparable.

If natural language was so good for programs, we’d be using it - many many people have tried from literate programming onward.

Re:Ladybird: Closing this as we are no longer pursuing Swift... by librasteve on Thursday February 19, 2026 @04:06AM (#47071638)
I fully accept that formalism is an important factor in programming language design. But all HLLs (well, even ASM) are a compromise between machine speak (https://youtu.be/CTjolEUj00g?si=79zMVRl0oMQo4Tby) and human speak. My case is that the current fashion is to draw the line at an overly simple level, and that there are ways to wrap the formalism in more natural constructs that trigger the parts of the brain that have evolved to hanle language (nouns, verbs, adverbs, prepositions and so on).

Here's a very simple, lexical declaration made more human friendly by use of the preposition `my` (or `our` if it is packaged scoped)...

  my $x = 42;
Re:Ladybird: Closing this as we are no longer pursuing Swift... by j_w on Thursday February 19, 2026 @11:29AM (#47075538)
How is that snippet any better than:

x := 42

Or

let x = 42

Or

x = 42

It seems like a regression from modern languages.

Re:Ladybird: Closing this as we are no longer pursuing Swift... by bmn__ on Monday February 23, 2026 @10:31AM (#47123595)
"my" is 33% shorter than "let"

Example 1 and 3 are not declarations, so apples ↔ oranges

Re:Ladybird: Closing this as we are no longer pursuing Swift... by j_w on Monday February 23, 2026 @11:18AM (#47124381)
my $x = 42;

let x = 42

Well, when you add in the '$' and ';' tokens the "let" example is still shorter. Also as another person replied to you, those other two examples are declarations in other languages. So 0 for 3 there.

Re:Ladybird: Closing this as we are no longer pursuing Swift... by yossi_peti on Monday February 23, 2026 @11:16AM (#47124351)
Example 1 is a declaration in Go. Example 3 is a declaration in Python.
Re:Ladybird: Closing this as we are no longer pursuing Swift... by grey-area on Friday February 20, 2026 @03:01AM (#47085086)
Have you looked at all the previous attempts?

Your example is not compelling I’m afraid but you should try building a language to see. Also read literate programming if you haven’t already.

Re:Ladybird: Closing this as we are no longer pursuing Swift... by palata on Thursday February 19, 2026 @09:45AM (#47074304)
Natural languages are ambiguous, and that's a feature. Computer languages must be unambiguous.

I don't see a case for "complex" vs "simple" in the comparison with natural languages.

Re:Ladybird: Closing this as we are no longer pursuing Swift... by tom_m on Thursday February 19, 2026 @10:39AM (#47074977)
Exactly. I mean think about the programming languages used in aircraft and such. There's reasons. It all depends on what people are willing to tolerate.
Re:Ladybird: Closing this as we are no longer pursuing Swift... by h3lp on Friday February 20, 2026 @12:11PM (#47090759)
Literate programming is not about programming in natural languages: it's about integrating code (i.e. the formal description in some DSL) with the meta-code such as comments, background information, specs, tests, etc.

BTW, one side benefit of LP is freedom from arbitrary structure of DSLs. A standard practice in LP is to declare and define objects in the spot in which they are being used; LP tools will parse them out and distribute to the syntactically correct places.

Re:Ladybird: Closing this as we are no longer pursuing Swift... by grey-area on Friday February 20, 2026 @02:49PM (#47092965)
Well I think the ambition was to have as much as possible in natural language, with macros calling out to ‘hidden’ code intended for machines. So I do think there is a good link with later attempts to write using natural language and make computer languages more human-friendly and he was one of the first to have this idea.

Neither strategy has had much success IMO.