Re: else ladders practice

Liste des GroupesRevenir à cl c  
Sujet : Re: else ladders practice
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.c
Date : 22. Nov 2024, 17:06:19
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vhqa5r$17oi0$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
On 22/11/2024 12:05, Bart wrote:
On 21/11/2024 13:00, David Brown wrote:
On 20/11/2024 21:17, Bart wrote:
 
Your development process sounds bad in so many ways it is hard to know where to start.  I think perhaps the foundation is that you taught yourself a bit of programming in the 1970's,
 I did a CS degree actually. I also spent a year programming, working for the ARC and SRC (UK research councils).
 But since you are being so condescending, I think /your/ problem is in having to use C. I briefly mentioned that a 'better language' can help.
 
I use better languages than C, when there are better languages than C for the task.  And as you regularly point out, I don't program in "normal" C, but in a subset of C limited by (amongst many other things) a choice of gcc warnings, combined with compiler extensions.
My programming and thinking is not limited to C.  But I believe I have a better general understanding of that language than you do (though there are some aspects you no doubt know better than me).  I can say that because I have read the standards, and make a point of keeping up with them.  I think about the features of C - I don't simply reject half of them because of some weird prejudice (and then complain that the language doesn't have the features you want!).  I learn what the language actually says and how it is defined - I don't alternate between pretending it is all terrible, and pretending it works the way I'd like it to work.

While I don't claim that my language is particularly safe, mine is somewhat safer than C in its type system, and far less error prone in its syntax and its overall design (for example, a function's details are always defined in exactly one place, so less maintenance and fewer things to get wrong).
 So, half the options in your C compilers are to help get around those shortcomings.
What is your point?  Are you trying to say that your language is better than C because your language doesn't let you make certain mistakes that a few people sometimes make in C?  So what?  Your language doesn't let people make mistakes because no one else uses it.  If they did, I am confident that it would provide plenty of scope for getting things wrong.
People can write good quality C with few mistakes.  They have the tools available to help them.  If they don't make use of the tools, it's their fault - not the fault of the language.  If they write bad code - as bad programmers do in any language, with any tools - it's their fault.

 You also seem proud that in this example:
    int F(int n) {
       if (n==1) return 10;
       if (n==2) return 20;
   }
 You can use 'unreachable()', a new C feature, to silence compiler messages about running into the end of the function, something I considered a complete hack.
I don't care what you consider a hack.  I appreciate being able to write code that is safe, correct, clear, maintainable and efficient.  I don't really understand why that bothers you.  Do you find it difficult to write such code in C?

 My language requires a valid return value from the last statement. In that it's similar to the Rust example I posted 9 hours ago.
If you are not able to use a feature such as "unreachable()" safely and correctly, then I suppose it makes sense not to have such a feature in your language.
Personally, I have use of powerful tools.  And I like that those powerful tools also come with checks and safety features.
Of course there is a place for different balances between power and safety here - there is a reason there are many programming languages, and why many programmers use different languages for different tasks.  I would not expect many C programmers to have much use for "unreachable()".

 Yet the gaslighting here suggested what I chose to do was completely wrong.
 
And presumably you also advise doing so on a bargain basement single-core computer from at least 15 years ago?
 Another example of you acknowledging that compilation speed can be a problem. So a brute force approach to speed is what counts for you.
 
No, trying to use a long-outdated and underpowered computer and then complaining about the speed is a problem.
But if I felt that compiler speed was a serious hinder to my work, and alternatives did not do as good a job, I'd get a faster computer (within reason).  That's the way things work for professionals.  (If I felt that expensive commercial compilers did a better job than gcc for my work, then I'd buy them - I've tested them and concluded that gcc is the best tool for my needs, regardless of price.)

If you found that it took several hours to drive 20 miles from A to B, your answer would be to buy a car that goes at 300mph, rather than doing endless detours along the way.
Presumably, in your analogy, the detours are useful.

 Or another option is to think about each journey extremely carefully, and then only do the trip once a week!
 
That sounds a vastly better option, yes.
Certainly it is better than swapping out the car with an electric scooter that can't do these important "detours".

Date Sujet#  Auteur
31 Oct 24 * else ladders practice255fir
31 Oct 24 +* Re: else ladders practice9Anton Shepelev
31 Oct 24 i+- Re: else ladders practice1fir
31 Oct 24 i`* Re: else ladders practice7James Kuyper
1 Nov 24 i `* Re: else ladders practice6David Brown
2 Nov 24 i  +* Re: else ladders practice2James Kuyper
2 Nov 24 i  i`- Re: else ladders practice1David Brown
2 Nov 24 i  `* Re: else ladders practice3fir
2 Nov 24 i   +- Re: else ladders practice1David Brown
2 Nov 24 i   `- Re: else ladders practice1James Kuyper
31 Oct 24 +* Re: else ladders practice5Richard Harnden
31 Oct 24 i+* Re: else ladders practice3fir
31 Oct 24 ii`* Re: else ladders practice2fir
31 Oct 24 ii `- Re: else ladders practice1fir
31 Oct 24 i`- Re: else ladders practice1Bonita Montero
31 Oct 24 +* Re: else ladders practice22Dan Purgert
31 Oct 24 i+* Re: else ladders practice3fir
31 Oct 24 ii`* Re: else ladders practice2Dan Purgert
31 Oct 24 ii `- Re: else ladders practice1fir
16 Nov 24 i`* Re: else ladders practice18Stefan Ram
16 Nov 24 i +* Re: else ladders practice5Bart
16 Nov 24 i i`* Re: else ladders practice4David Brown
19 Nov 24 i i `* Re: else ladders practice3Janis Papanagnou
19 Nov 24 i i  +- Re: else ladders practice1David Brown
19 Nov 24 i i  `- Re: else ladders practice1Michael S
16 Nov 24 i +* Re: else ladders practice3James Kuyper
19 Nov 24 i i`* Re: else ladders practice2Janis Papanagnou
1 Dec 24 i i `- Re: else ladders practice1Tim Rentsch
16 Nov 24 i +* Re: else ladders practice2Lew Pitcher
17 Nov 24 i i`- Re: else ladders practice1Tim Rentsch
20 Nov 24 i +* Re: else ladders practice3Dan Purgert
30 Nov 24 i i`* Re: else ladders practice2Rosario19
5 Dec 24 i i `- Re: else ladders practice1Dan Purgert
1 Dec 24 i `* Re: else ladders practice4Waldek Hebisch
1 Dec 24 i  `* Re: else ladders practice3Janis Papanagnou
2 Dec 24 i   `* Re: else ladders practice2Waldek Hebisch
2 Dec 24 i    `- Re: else ladders practice1Janis Papanagnou
31 Oct 24 +- Re: else ladders practice1Janis Papanagnou
31 Oct 24 `* Re: else ladders practice217Bart
1 Nov 24  `* Re: else ladders practice216fir
1 Nov 24   +* Re: else ladders practice198Bart
1 Nov 24   i+* Re: else ladders practice196fir
1 Nov 24   ii`* Re: else ladders practice195Bart
1 Nov 24   ii `* Re: else ladders practice194fir
1 Nov 24   ii  `* Re: else ladders practice193fir
1 Nov 24   ii   `* Re: else ladders practice192Bart
1 Nov 24   ii    `* Re: else ladders practice191David Brown
1 Nov 24   ii     `* Re: else ladders practice190Bart
1 Nov 24   ii      `* Re: else ladders practice189David Brown
1 Nov 24   ii       `* Re: else ladders practice188Bart
2 Nov 24   ii        `* Re: else ladders practice187David Brown
2 Nov 24   ii         `* Re: else ladders practice186Bart
3 Nov 24   ii          +- Re: else ladders practice1Tim Rentsch
3 Nov 24   ii          +* Re: else ladders practice4fir
3 Nov 24   ii          i`* Re: else ladders practice3Bart
3 Nov 24   ii          i `* Re: else ladders practice2fir
3 Nov 24   ii          i  `- Re: else ladders practice1fir
3 Nov 24   ii          +* Re: else ladders practice4fir
3 Nov 24   ii          i`* Re: else ladders practice3Bart
3 Nov 24   ii          i `* Re: else ladders practice2fir
3 Nov 24   ii          i  `- Re: else ladders practice1fir
3 Nov 24   ii          +* Re: else ladders practice35David Brown
3 Nov 24   ii          i+- Re: else ladders practice1Kaz Kylheku
3 Nov 24   ii          i+* Re: else ladders practice23Bart
4 Nov 24   ii          ii+* Re: else ladders practice21David Brown
4 Nov 24   ii          iii`* Re: else ladders practice20Bart
4 Nov 24   ii          iii +* Re: else ladders practice2David Brown
5 Nov 24   ii          iii i`- Re: else ladders practice1Bart
5 Nov 24   ii          iii `* Re: else ladders practice17David Brown
5 Nov 24   ii          iii  +* Re: else ladders practice2Bart
5 Nov 24   ii          iii  i`- Re: else ladders practice1David Brown
6 Nov 24   ii          iii  +* Re: else ladders practice5Bart
6 Nov 24   ii          iii  i`* Re: else ladders practice4David Brown
6 Nov 24   ii          iii  i `* Re: else ladders practice3Bart
7 Nov 24   ii          iii  i  `* Re: else ladders practice2David Brown
7 Nov 24   ii          iii  i   `- Re: else ladders practice1Bart
9 Nov 24   ii          iii  `* Re: else ladders practice9Janis Papanagnou
9 Nov 24   ii          iii   `* Re: else ladders practice8David Brown
10 Nov 24   ii          iii    `* Re: else ladders practice7Janis Papanagnou
10 Nov 24   ii          iii     `* Re: else ladders practice6David Brown
19 Nov 24   ii          iii      `* Re: else ladders practice5Janis Papanagnou
19 Nov 24   ii          iii       `* Re: else ladders practice4David Brown
19 Nov 24   ii          iii        `* Re: else ladders practice3Janis Papanagnou
19 Nov 24   ii          iii         `* Re: else ladders practice2David Brown
20 Nov 24   ii          iii          `- Re: else ladders practice1Janis Papanagnou
9 Nov 24   ii          ii`- Re: else ladders practice1Janis Papanagnou
8 Nov 24   ii          i+* Re: else ladders practice9Janis Papanagnou
8 Nov 24   ii          ii+* Re: else ladders practice4David Brown
9 Nov 24   ii          iii`* Re: else ladders practice3Janis Papanagnou
9 Nov 24   ii          iii `* Re: else ladders practice2David Brown
10 Nov 24   ii          iii  `- Re: else ladders practice1Janis Papanagnou
9 Nov 24   ii          ii`* Re: else ladders practice4Bart
9 Nov 24   ii          ii `* Re: else ladders practice3Janis Papanagnou
9 Nov 24   ii          ii  `* Re: else ladders practice2Bart
10 Nov 24   ii          ii   `- Re: else ladders practice1Janis Papanagnou
8 Nov 24   ii          i`- Re: else ladders practice1Bart
5 Nov 24   ii          `* Re: else ladders practice141Waldek Hebisch
5 Nov 24   ii           +- Re: else ladders practice1fir
5 Nov 24   ii           +* Re: else ladders practice24David Brown
5 Nov 24   ii           i+* Re: else ladders practice17Waldek Hebisch
5 Nov 24   ii           ii`* Re: else ladders practice16David Brown
6 Nov 24   ii           i`* Re: else ladders practice6Bart
5 Nov 24   ii           `* Re: else ladders practice115Bart
1 Nov 24   i`- Re: else ladders practice1fir
2 Nov 24   `* Re: else ladders practice17Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal