this post was submitted on 04 Feb 2025
1 points (100.0% liked)

Programming

2 readers
1 users here now

A magazine created for the discussion of computer programming-related topics.

Rules

Please keep submissions on topic and of high quality. No image posts, no memes, no politics. Keep the magazine focused on programming topics not general computing topics. Direct links to app demos (unrelated to programming) will be removed. No surveys.

founded 2 years ago
MODERATORS
 

Which programming language best deserves the label of, "modern C"?

#programming

top 20 comments
sorted by: hot top controversial new old

@vwbusguy@mastodon.online zig

[–] Fratm@mastodon.social 1 points 1 month ago

@vwbusguy@mastodon.online I only picked python because out of the the listed it's the only one in familiar with.

[–] raptor85@mastodon.gamedev.place 1 points 1 month ago (1 children)

@vwbusguy@mastodon.online the "Modern C" is C23, all of those are too high level to really compare.

[–] vwbusguy@mastodon.online 1 points 1 month ago* (last edited 1 month ago) (1 children)

@raptor85 I was thinking about that. C was high level but over time has been considered more and more low with so many other languages abstracting on top of C. You could argue in favor of Python in the sense because it's the most high level here.

[–] raptor85@mastodon.gamedev.place 1 points 1 month ago (1 children)

@vwbusguy@mastodon.online C is still "high level" in that it doesn't 1:1 produce specific instructions like low level languages like assembly do, but yeah the abstractions are a lot more intense in stuff like python. Personally I'd say python is more the modern "perl" than the modern C though. Rust and go are dlang's more popular younger brothers

[–] vwbusguy@mastodon.online 1 points 1 month ago (2 children)

@raptor85@mastodon.gamedev.place Python is BASIC and C had a baby.

[–] vwbusguy@mastodon.online 1 points 1 month ago

@raptor85@mastodon.gamedev.place Perl is a cat that got ahold of C's yarn and now there's bits of string everywhere.

[–] raptor85@mastodon.gamedev.place 1 points 1 month ago (1 children)

@vwbusguy@mastodon.online python is just verbose lua made by someone allergic to punctuation and formatting.

[–] vwbusguy@mastodon.online 1 points 1 month ago* (last edited 1 month ago)

@raptor85 It's kind of the opposite, IMO, since Python was older and Lua was trying to fit somewhere in the space around Python, Perl, and Ruby.

https://www.lua.org/doc/hopl.pdf

[–] michalfita@mastodon.social 1 points 1 month ago

@vwbusguy@mastodon.online
A. You missed Zig from the equation (technically nearest one)

B. None from the list; thinking about these language as kind of C descendant is wrong mentality, neither correct idiomatic Go nor Rust are close to C

Why Python? Completely out of league...

[–] TerryHancock@realsocial.life 1 points 1 month ago (1 children)

@vwbusguy@mastodon.online

I've heard it argued that Python is "modern COBOL"... 😅

[–] vwbusguy@mastodon.online 1 points 1 month ago* (last edited 1 month ago) (1 children)

@TerryHancock I'm guessing whoever said that has never actually programmed in COBOL. The only correlation I can think of is they were both designed to be human friendly to read/write, but the implementation of that concept is extremely different between the two.

Cucumber/Gherkin would be modern COBOL, IMO.

https://cucumber.io/docs/gherkin/reference

[–] TerryHancock@realsocial.life 1 points 1 month ago (1 children)

@vwbusguy@mastodon.online

I think they were talking more about its social role -- a "good enough" language trundling along while trends come and go, used mostly by institutions who aren't primarily about software development.

Not the design of the language itself.

[–] vwbusguy@mastodon.online 1 points 1 month ago* (last edited 1 month ago)

@TerryHancock You also just described php, perl, rust, javascript, Java, and a whole range of others with that. There are some things where python isn't frankly just "good enough" and plenty of software focused shops use it. Ansible, Jupyter, AI, Instagram - it's a massive list.

[–] rayk@techhub.social 1 points 1 month ago

@vwbusguy@mastodon.online choices are kind of limited. Maybe consider including a "none of the above" option next time?

[–] ck@chaos.social 1 points 1 month ago

@vwbusguy@mastodon.online #harelang

@vwbusguy@mastodon.online Zig and C3 are the modern C-likes - minimal spec, light-weight languages.

Except Go, which I'm not that much a fan of, other languages deviate from C-like similarity.

If Rust is "close" to C, then I prefer Vale instead.

[–] cobratbq@mastodon.social 1 points 1 month ago

@vwbusguy@mastodon.online I think the question itself is more problematic or complicated than you might have thought.

[–] vwbusguy@mastodon.online 1 points 1 month ago (1 children)

Since I can't vote in my own poll, my opinion is that the argument can be made any of them, but Go is the most on the nose, both in terms of language design and that it shares a co-author with C (Ken Thompson).

Python is more a modern BASIC (usually) implemented in C. It's BASIC and C had a baby.

Rust should be on this list because of how many legacy C things are getting ported to rust due to memory and thread safety, etc.

[–] vwbusguy@mastodon.online 1 points 1 month ago

If you start from C and get less pedantic, you get python. If you get more pedantic, you get rust. If you stay similarly pedantic, you get golang.