正在加载视频...

视频加载失败

I removed ';' from C

85,680 次观看 • 1 年前 •via X (Twitter)

36 条评论

Тsфdiиg 的头像
Тsфdiиg1 年前

- Tiny C Compiler: - B reference: - The Patch:

Dinam 的头像
Dinam1 年前

Bro is trying to turn C to JavaScript

learntToCode 的头像
learntToCode1 年前

This heresy against Holy C has been noted. May The Emperor’s mercy find you quickly.

Parth 的头像
Parth1 年前

Okay now remove { } and boom it's Python

Noga Navon🏳️‍⚧️ الزهرة الحكيمة נוגה נבון 的头像
Noga Navon🏳️‍⚧️ الزهرة الحكيمة נוגה נבון1 年前

My hot take that the last statement in a block shouldn't have a semicolon, but that curly braces should be mandatory even if there's only one statement within.

Тsфdiиg 的头像
Тsфdiиg1 年前

Pascal my beloved

Pehdrew 的头像
Pehdrew1 年前

I'll use ; more in python.

⃠ emojibake 的头像
⃠ emojibake1 年前

in js the annoying thing about asi is, it turns return 42 into return; 42; which then returns undefined instead of 42

vitorpy 的头像
vitorpy1 年前

You messed with the primal forces of nature, Mr. @tsoding!

Samyar 🌌 的头像
Samyar 🌌1 年前

“Let’s recompile the compiler”

ozzyalone 的头像
ozzyalone1 年前

I think the case for semicolons in C is that it's such an old language that, at the time, there probably wasn't any certainty that every OS would use LF or CR (or both) as an EOL marker; so by requiring a programmer to use a semicolon, there was always an EOL marker.

sukru tikves 的头像
sukru tikves1 年前

“I removed the safety goggles and respirator. Most of the time things are just fine” Semicolon is there for a very specific reason. It breaks ambiguity (And frankly we needed some more checks)

allisx86 的头像
allisx861 年前

C-emi colon

Alexey Lyakhov 的头像
Alexey Lyakhov1 年前

I was disabling semicolons for years, until I found one very specific case when I needed semicolons. The case was global search with regular expression across whole codebase with replacement, for the part of string which was at the end of the line, but also the string was used in different places, and should be replaced only at the end of the line. Enabling semicolons solved this issue, but made a mess with git repository. Since then I just keep semicolons enabled in all of my projects.

Felipe Rocha⚣⚔️🇻🇦#voltaGLS 的头像
Felipe Rocha⚣⚔️🇻🇦#voltaGLS1 年前

Code is meant to be read by humans too, unlike binary files. So I prefer the C semicolon.

Paweł Zegartowski 👾 的头像
Paweł Zegartowski 👾1 年前

I'd rather add it to python, along with the curly braces instead of indentations.

Svetlin Totev 的头像
Svetlin Totev1 年前

Humans mostly look at the indentation. So the computer should do the same. Otherwise it is easy to write something that doesn't behave the way a human would assume. Every bug and exploit due to C syntax is caused by misleading indentation but devs still say it shouldn't matter...

11revert 的头像
11revert1 年前

Most programming languages are too verbose, they should take inspiration from rust:

beter 的头像
beter1 年前

@theshashwat20 i am boutta write c like i write javascript and you will witness all of it live

lothro12 的头像
lothro121 年前

now make a python compiler that expects semicolons

sorek 的头像
sorek1 年前

I like semicolons for clarity. I agree it's mostly for humans, but it really helps with getting rid of misunderstandings.

Rafael Coelho 的头像
Rafael Coelho1 年前

why?

Тsфdiиg 的头像
Тsфdiиg1 年前

why not?

term est 🍓TRY AND STOP ME 🏳️‍⚧️ 的头像
term est 🍓TRY AND STOP ME 🏳️‍⚧️1 年前

I've never seen such bullshit in my life before No, the compiler can't know where you need a semicolon. Forcing the compiler to do so, only creates ambiguities Stop spreading misinformation especially when you have such a large follower base void a(){} void b() { return a(); }

Тsфdiиg 的头像
Тsфdiиg1 年前

1. It's ironic that my change literally doesn't break your example. It's specifically for statements that are `<rvalue><;>`, not `return <rvalue><;>` 2. You are the one spreading misinformation by calling educational material that is designed to provide food for thought and spark constructive discussion "misinformation". 3. By bringing the "follower base" you are revealing that you are simply jealous and cannot be take seriously. :)

Pere 的头像
Pere1 年前

Without semicolons, it's easier to make mistakes that compile without errors, which create harder bugs to debug, or even notice.

Nephew Tom 的头像
Nephew Tom1 年前

Wow! Thank you for this.🙏 Yes, semicolons between expressions needed/preferred.

Tiago AOA 的头像
Tiago AOA1 年前

Removing the semi-colon introduces ambiguities. This kind of ambiguities (what should "run" first) might be useful for performance, but I'd rather have a proper language for that.

Raindrop 的头像
Raindrop1 年前

😨😨

D T Dubs | Polyunsaturated Fatty Pragmatics 🇺🇸 的头像
D T Dubs | Polyunsaturated Fatty Pragmatics 🇺🇸1 年前

Could've stopped at "greatest semicolon conspiracy ever" - Pft, silly hoomans, you've been duped! 🤓 All "proper syntax" chatter aside, this is a great demo on benefits of understanding compilers. Some of us went a long time taking compilers for granted before we learned.

emmo00.eth 的头像
emmo00.eth1 年前

@GODPIXELthereal

shaurya 的头像
shaurya1 年前

YOU MONSTER...

Ivan Bushmarinov 的头像
Ivan Bushmarinov1 年前

I think you trade the missing semicolon errors for missing brace ones in that case.

『Llianen』🇵🇹 的头像
『Llianen』🇵🇹1 年前

As someone that spent on previous projects 85% of work time fixing people's made bugs, I feel like this would triple the bugs easily

Hugh Hoult 的头像
Hugh Hoult1 年前

REMOVE THE NEW LINE CHARACTER FROM C, IT IS TIME!

MartinJ 的头像
MartinJ1 年前

Use a linter?

相关视频