Learn C in Y Minutes
71–80 of 81 posts
Re: Learn C in Y Minutes
#72My takeaway from this thread is that C programmers are completely insufferable.
Re: Learn C in Y Minutes
#73Earlier quoted context omitted.
> So the investment is not paying off unless you are writing highly performance critical backend services. You took it too far. C opens the door for today's embedded, like, you know, blinking an LED with some microcontroller.
Most people do that on Arduino which is as c++ as it gets, with templates, etc...
Re: Learn C in Y Minutes
#74Earlier quoted context omitted.
> So the investment is not paying off unless you are writing highly performance critical backend services. You took it too far. C opens the door for today's embedded, like, you know, blinking an LED with some microcontroller.
Most people do that on Arduino which is as c++ as it gets, with templates, etc...
Re: Learn C in Y Minutes
#75Re: Learn C in Y Minutes
#76This should have been formulated as:
You must declare a function as a prototype if you use the function before its definition appears in the code.
It's not just main but all functions.
Re: Learn C in Y Minutes
#77I'd say start learning in C++ and slowly transition to C. That's what I did; it was worth it. There are a lot of good resources in learning C & C++.
Re: Learn C in Y Minutes
#78Earlier quoted context omitted.
> More difficult to read Subjective, and I do not find it more difficult to read. On the contrary, I often find shorter and denser expressions (especially around obligatory fluff that doesn't actually do much) to improve readability and make it easier to focus on the interesting part. > more difficult to edit Subjective, and I do not find it more difficult to edit. In general, as long as you're not using a magnetized…
> with one instruction per line I shouldn't be surprised, of course you're also the kind of person who writes terribly long lines of code. We have ultra-wide screens nowadays, better put them to good use. Anyways, you might think you're making a point by repeating "it's all opinions", but that doesn't mean your single opinion is equal to everyone else. And on the subject of one vs multiple declarations, you're overwh…
You're very wrong.
Readability is currently impossible to measure precisely. All the opinions are grounded in impossible to quantify and define personal skills, predispositions, and habits.
"It" may be "more readable" to you. And your friends. That is still just your (and your friends') opinion, describing a feeling you have. It's not measurable. It's not provable. It's just what you think is happening, but that's it - just a thought.
No facts. No measures. No definitions. As long as your opinion has these qualities, yes, it's equal to everyone else's.
The problem with that is that it's narrow-minded. You should try to understand that, in different circumstances and for different people, the feeling of what's readable and not readable can be drastically different from your own.
There are people who swear by ⍝P⌊ or K and say they're the most readable languages ever. Others will-tell-you-there's-nothing-wrong-with-kebab-case and that (parens (are (not (a) problem) either))))))). Some will tell you that any language will do, as long as you drown it in text (like Knuth's literate programming). Yet others will try to make prose be executable, like in Inform. Some will tell you $igil$ improve readability, some will say they don't. Some will be horrifiedSeeingCamelCase, others will_see_underscores_as_ugly. Some will fight for apps hungarian, some will lead a crusade against hungarian notation as a whole.
The opinions are varied, exactly because there is no hard data to support any single position. Your opinion is yours to have, and you may live in a time and place where people you interact with share the same opinion, giving you an illusion of importance. One step outside of your bubble will show you otherwise - it's just an opinion, one of many, and not magically better just because it's yours.
Re: Learn C in Y Minutes
#79Earlier quoted context omitted.
> with one instruction per line I shouldn't be surprised, of course you're also the kind of person who writes terribly long lines of code. We have ultra-wide screens nowadays, better put them to good use. Anyways, you might think you're making a point by repeating "it's all opinions", but that doesn't mean your single opinion is equal to everyone else. And on the subject of one vs multiple declarations, you're overwh…
> you might think you're making a point by repeating "it's all opinions", but that doesn't mean your single opinion is equal to everyone else. You're very wrong. Readability is currently impossible to measure precisely. All the opinions are grounded in impossible to quantify and define personal skills, predispositions, and habits. "It" may be "more readable" to you. And your friends. That is still just your (and your…
Otherwise I'll be happy to discuss about whether multiple assignments is readable or not, but when the majority of people think it's not, maybe the onus is on you to at least advance some arguments?
Re: Learn C in Y Minutes
#80Earlier quoted context omitted.
> you might think you're making a point by repeating "it's all opinions", but that doesn't mean your single opinion is equal to everyone else. You're very wrong. Readability is currently impossible to measure precisely. All the opinions are grounded in impossible to quantify and define personal skills, predispositions, and habits. "It" may be "more readable" to you. And your friends. That is still just your (and your…
You can call me narrow-minded all you want, I'm not going to argue with someone who has this[0] as argument. Otherwise I'll be happy to discuss about whether multiple assignments is readable or not, but when the majority of people think it's not, maybe the onus is on you to at least advance some arguments? [0] https://news.ycombinator.com/item?id=26790701
That's the whole point: multiple assignments (and everything else) are NEITHER readable NOR unreadable, objectively.
There is no way to argue either way. Appeal to majority is a fallacy, so it's a non starter. Other than that, there's no data, no hard facts, no measures, nothing to talk about!
Again: multiple assignements (and everything else) may feel easier to read to you. It's just a feeling. There are bound to be people who feel differently. Both positions are equally subjective.
It's further complicated by the fact that readability is NOT a simple function of lexical structure. The exact same line of code can be unreadable to you at one point, then once you learn the intent or rule behind it, it magically becomes redable. It just "clicks" and suddenly you have no problems with reading it.
There are some properties which seem to correlate with readability, like predictability. There are some hard constraints due to how the eye is built. Even if you narrow those as much as possible, the space of possible syntaxes and styles which fit in these is absulutely HUGE.
I mentioned APL. This is an example taken from the front page of APL wiki:
','(≠⊆⊢)'comma,delimited,text'
┌─────┬─────────┬────┐
│comma│delimited│text│
└─────┴─────────┴────┘
And this is the commentary below it: "many functions can be expressed in fewer characters than even the shortest fitting name. For example ≠⊆⊢ is but three characters, while you would need five for the name Split"They argue that "≠⊆⊢" is more readable than "Split". And, to them, it IS - once they learned the language. This suggests that readability is much more dependent on your knowledge, skills, and habits, than on the objective shape of piece of code.
I went out of my way to learn the widest possible variety of programming languages. The spectrum of things considered readable or not is so wide that it's really hard to find ANY points common to all of the languages. If there even are any!
So, again, step outside of your bubble and your mind will be blown.