Rant about programming language trends 

I hate the trend of new languages using the syntax "name: Type" instead of the familiar "Type name" to declare variables.

If static types have been jolted on to your language as an afterthought, then sure, but what's the point if you're designing a language from scratch?

The colon is superfluous (adds horizonal length and visual clutter), and while I don't really care about the order of the name and type, "Type name" is very well established from the whole C lineage of syntax.

Maybe there's a lineage of languages as old as C where the norm was "name: Type" so you could argue (if that really is the case, I don't know) that neither syntax is more or less well established... But if you're designing a language specifically to replace C, C++, Java, etc. then you have no excuse IMO.

Culprits:
- Rust
- Kotlin
- Swift
- Zig
- Nim
- Hare
@taylan some people have inferiority compex because of being incapable to write in C (yes, it takes brains in the head) and they try to invent some useless shit that looks like pascal. it will never replace C. because there's no reason to replace it. but why do you care for that useless sandboxes for feeble minded kids that cannot manage memory or cannot understand what they write in code, if C is still there, with its clean and fine syntax, the best performance ever and with support of over 3000 architectures.
@iron_bug @bonifartius

Damn, you sound like the epitome of a leet brogrammer. :blobcatjoy:
@bonifartius @taylan I'm a professional programmer and don't see any problems with C. I wrote in C things from kernel parts to huge server software and web applications. absolutely no problems. people wrote in C for over 30 years and what are the "problems with C" some youngsters have? I think thiese are rather problems with brains. C is still the same: clear, robust and perfect.
@iron_bug @bonifartius

> C is clear

http://www.literateprogramming.com/ctraps.pdf

> I once talked to someone who was writing a C program that was going to run stand-alone in a small microprocessor. When this machine was switched on, the hardware would call the subroutine whose address was stored in location 0. In order to simulate turning power on, we had to devise a C statement that would call this subroutine explicitly. After some thought, we came up with the following:

> (*(void(*)())0)();

:blobcatthinkOwO:

OK maybe that's an extreme example, here's a very simple one:

int *foo[10];

Is that a pointer to an int-array of size 10, or a size 10 array of int pointers? And I'm not even mentioning the weirdness that "int" appears at the start even though it's the innermost type.

> C is robust

What is your definition of robust? C is neither type-safe nor memory-safe. There are countless instances of "undefined behavior" in the language, which are often exploitable for things like remote code execution.

> C is perfect

Come on, man.
@bonifartius @taylan the most strange thing is when I was about 12 I started to write in C and it was easy and funny.and I started from writing drivers and hardware support for DOS. at 12. and now adult people tell me crap about "how difficult C is". so they have damn less brains than I had in childhood or what? this is ridiculous.
@bonifartius @taylan and yes, the fist computers we soldered ourselves. from microchips. at home. damn, now stupid kids cannot damn wipe their own arse without detailed guide on youtube, two qualified coaches and mommy's assistance. these people cannot read. cannot think. cannot do anything themselves.
this is NOT the problem of C.

@iron_bug
tbh, i wouldn't blame the kids, nobody has shown them how to research stuff with books etc. schools here are of no use anymore.

it's not the problem of C though, the K&R book is really the only thing you need to program C. aside of something to write down stuff. can't say that about most languages now. C isn't my favorite language, but it's totally serviceable.

@taylan

@bonifartius @taylan libraries are closed? I don't believe, just people got stupud.
Follow

@iron_bug
no, but if you never show kids that libraries exists and how to use them, they'll never use them. i don't say that people aren't lazy and stupid, but it's the parents and teachers.

@taylan

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.