HackerTrans
TopNewTrendsCommentsPastAskShowJobs

neutrono

no profile record

comments

neutrono
·vor 2 Jahren·discuss
It should have been called _Overload or something similar, since it's not really a generic.
neutrono
·vor 3 Jahren·discuss
How to kill your company in one week?
neutrono
·vor 3 Jahren·discuss
In C23 you can use the attribute

    [[nodiscard]]
on functions to mark that the result from function shouldn't be discarded. I think there is also a

    [[reproducible]]
attribute for saying a function doesn't do side effects.
neutrono
·vor 3 Jahren·discuss
I think he means that the C API is stack based?
neutrono
·vor 3 Jahren·discuss
What is nano lacking in power?
neutrono
·vor 3 Jahren·discuss
One can always use Home and End in that case.
neutrono
·vor 3 Jahren·discuss
Well, IIRC even in the K&R book, a book which many C programmers admire for it's excellent documentation and prose, and rightly so, there is a specific section mentioning that C's declaration syntax has been castigated.

Next, even if C is not a "high level language", which depend on your definition of "high level language", the perks of a proper module system for low level coding cannot go unmentioned.

- Rust, a language that lives in a somewhat similar abstraction and power space as C, has a module system.

- C++, a language that lives closer to C in features, also now, in C++23 I believe, has a module system, and before that, had namespaces.

On implicit conversions, I think having implicit conversions are hard to get right, and I think that C has them is not a feature, but rather a bug. Languages that have taken some inspirations from C, has chosen usually to do away with implicit conversions, or at the very least, limit their use.

And the array -> pointer in functions, I percieve to be a big mistake, not at the time, perhaps it was not known better ways, but as the years roll by, I think it's a misfeature given the countless exploits that have taken place due to a read past the bounds of an array.

I think C is a good language, but these misfeatures burdens the language in an undue way, and I think a better way to design a language is to be more explicit. Something like Rust's

    unsafe { /* Here be dragons */ }
is better design, in my opinion. I think if you want implicit conversions, there should be an explicit way to declare that you want things to be implicit.

That's just my 2¢
neutrono
·vor 3 Jahren·discuss
The declaration syntax and the lack of a proper module/namespacing system is also a mistake, but perhaps not as big as the way arrays decays into pointers. Implicit conversions I suppose could also be classified as a mistake.
neutrono
·vor 3 Jahren·discuss
Citizens have a huge amount of power within the government, being able to vote in elections and pursue ballot initiatives. How is that not a democracy?