Похожие чаты

This video is really great. https://www.youtube.com/watch?v=QpAhX-gsHMs

32 ответов

4 просмотра

Saved for later, sounds interesting

This video had the basic for loop macro: https://stackoverflow.com/questions/69336050/how-to-implement-gos-defer-in-c-so-that-it-allows-declaring-vars

Thomas
This video had the basic for loop macro: https://s...

in real modern C can use cleanup, is more elegant

Thomas
This video had the basic for loop macro: https://s...

Here talk about defer FILE. void fcleanup(void* ppf){ if( *(void**)ppf) ) fclose(*(void**)ppf); } #define __cleanup(FN) __attribute__((cleanup(FN))) #define __fclose __cleanup(fcleanup) int main(){ __fclose FILE* f = fopen("file", "r"); ... }

Daniele°
in real modern C can use cleanup, is more elegant

I can't use compiler-specific extensions most of the time though

Daniele°
Why?

I use C compilers that aren't that good

Daniele°
For examples?

github.com/immortalvm/ivm-compiler

Thomas
github.com/immortalvm/ivm-compiler

@TRGWII is zig basically just C ?

Adrian
@TRGWII is zig basically just C ?

"C, but with the problems fixed"

Thomas
github.com/immortalvm/ivm-compiler

It's based on GCC, probably have attribute cleanup

Thomas
"C, but with the problems fixed"

hmm this mean zig will replace C in the future ?

Adrian
hmm this mean zig will replace C in the future ?

For some usecases for sure, but never all

Adrian
hmm this mean zig will replace C in the future ?

It doesn't seem to me similar enough to C to replace it.

D
What problems

https://mrcat.au/blog/zig_is_cool/

²
https://mrcat.au/blog/zig_is_cool/

It doesn't seem to give me what I really needed

D
What problems

cleanup code, failed integer hierarchy, implicit casts, defaulting to int, char signedness ambiguity, preprocessor, compilation model, no module system, no nuanced pointer types, ++

Thomas
cleanup code, failed integer hierarchy, implicit c...

in C char not have sign. char != signed char char != unsigned char

Daniele°
in C char not have sign. char != signed char char ...

of course the implementation will have to decide what to do with the abstraction

Daniele°
in C char not have sign. char != signed char char ...

It actually does, but each implementation can pick, and that's my point

Daniele°
in C char not have sign. char != signed char char ...

Even if it was just "char does not have signedness" that's still a huge problem

Thomas
Even if it was just "char does not have signedness...

Many type in C not have a sign, many type are not signed or unsigned.

Daniele°
Many type in C not have a sign, many type are not ...

Okay so the problem is larger than just char then

Thomas
Okay so the problem is larger than just char then

No problems, you only Need to understand the type abstraction

Daniele°
No problems, you only Need to understand the type ...

It's not an abstraction, it's just a mistake

Thomas
It's not an abstraction, it's just a mistake

It's not a error, it's abstraction.

Daniele°
It's not a error, it's abstraction.

What do you gain from having this "abstraction" then?

Thomas
What do you gain from having this "abstraction" th...

You are free to use signed or unsigned value for char implementation

Похожие вопросы

Обсуждают сегодня

#include <stdio.h> #include <stdlib.h> #include <time.h> void mass_first_generate(int mass[5][7]) {     for (int N = 0; N < 5; N++) {         for (int A = 0; A < 7; A++) {   ...
Чувак
6
https://www.linkedin.com/posts/ugama-benedicta-kelechi-codergirl-103041300_mobiledevelopment-fluttertraining-handsonlearning-activity-7263445699227254784-IdHB?utm_source=share...
CoderGirl
16
Всем привет! Имеется функция: function IsValidChar(ch: UTF8Char): Boolean; var i: Integer; ValidChars: AnsiString; begin ValidChars := 'abcdefghijklmnopqrstuvwxyzABCDE...
Евгений
44
VIP-397 BNBx Oracle implementation upgrade Summary This proposal, if approved, will upgrade the implementation of the BNBx Oracle contract on Venus from version 1 (V1) to v...
Venus Announcements
2
Ну вот просто даже давайте вот как. Какой нибудь конкретный кейс, можете в пример привести, где бч работает и приносит прикладную пользу, а не просто что бы было? Не крипту.
Alexander Andreev
22
For all those that keep asking why no pump? why this ? and why that...? Please close ur ewt chart and open 2 others - TOTAL (total mc) and BTC.D (btc dominance). Maybe BTC a...
Inn3r_G
19
"Since pnut can flip FTM easily, I'm swapping my FTM to pnut and hoping for a easy x5-x10" Perfect recipe for disaster. NFA but chances are, you'll end up as exit liquidity ...
C. A.
7
объясните пожалуйста, почему функция не работает должным образом? вроде должно брать активное окно сравнивать его размер с размером экрана, и если есть совпадение = true прове...
JF
12
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
AMD status update? No longer in the plan but something might be around the corner later on Chinese partner? No longer in the plan. This market does not seem to be the top ...
Ben
6
Карта сайта