Liste des Groupes | Revenir à cl c |
On Sun, 20 Apr 2025 14:53:54 +0100I don't quite get your point. So, given a generic form like:
bart <bc@freeuk.com> wrote:
On 20/04/2025 12:00, Janis Papanagnou wrote:In majority of languages in your list 'for' loops iterates through all>>
Exactly 19 days ago I'd even have written such a proposal, and,
fitting to the calendar date, of course I'd have used a distinct
name for the feature; 'for_losers(var,expr,expr[,expr])'.
This is quite telling in that:
>
(1) You regard the idea of desiring such a feature as a joke
>
(2) You consider those who'd like to use it as 'losers'
>
Just such a feature seems to be the primary style of 'for' in
languages such as Ada, Python, Modern Fortran, Odin, Ruby, Julia,
Rust, Matlab, Algol68, Euphoria, Ocaml, Logo, Nim, PL/I, Haxe, Lua,
....
>
elements of collection. If collection happens to be a range
(terminology shared by python and Rust) then 'for' behaves as a
counting loop. If it isn't then it does not. Even Matlab, despite its
fortranic roots, belongs to that group.
C++ achieve the same objectives [with typical C++ ugliness] by meansThat's what I'm asking! BCPL, an older and more primitive language than the other two, has such a 'for' as described above:
of std::foreach.
If I am not mistaken, all exception to that pattern are old languages.
>Not all, just many.
Even Bash has it. All losers?
>
Interestingly, so does BCPL: you may be aware that C was influencedSo, what happened?
by B, which itself was supposed to be influenced by BCPL. So what the
hell happened?
>
Les messages affichés proviennent d'usenet.