Code practice and testing

gcjr:
it's a micro-controller ?! no need for such

Uh.... without any scheduling, then nothings works.
EVERY single program schedules things. If not, then nothing ever happens.
You are not thinking in the proper context.
Maybe you are thinking about an actual OS with tasking or pre-emptive tasking vs just scheduling something?

A piece of code like:

void loop(void)
{
   Serial.println("I'm alive");
}

is scheduling something.
It is scheduling code (the Serial.println() ) to output the message to the serial port over and over again with no added delay.
It is very primitive, but still it is scheduling something.

The entire point of blink-without-delay is to provide a scheduling mechanism that does not use delay() to allow other things to be scheduled without being blocked by some other piece of code's scheduling flow that needs delays.

I just happen to believe that for all but extremely simple use cases, a library that provides scheduling capabilities is a better fit for many users, particularly less technical users, than trying to push them to use a blink-without-delay technique of scheduling.

--- bill

a scheduler has a very clear meaning in computer science

gcjr:
a scheduler has a very clear meaning in computer science

Sure, and on Arduino, blink-without-delay as well as many timer/metro libraries are all techniques that do scheduling.

--- bill

more like batch processing

gcjr:
more like batch processing

It is scheduling.
Just look at the very definition to the scheduling Wikipedia page you linked to:

scheduling is the method by which work is assigned to resources that complete the work

It is a broad definition as it should be as "scheduling" is very broad term as it can be done in many different ways.
Batch processing is a form a scheduling.

If you look at what blink-without-delay and the various scheduling libraries like metro libraries do,
they take parameters, and then based on elapsed times, they run things.

With metro type libraries there can be other capabilities, like running the code once, or at repeated time intervals, and the time intervals can be altered on the fly.

This is more than just simple batch processing.

--- bill

bperrybap:
I believe that the entire reason blink-without-delay came into existence is because Arduino is lacking even some very basic scheduling capabilities.
IMO, a lack of some sort of scheduling is very a big hole in Arduino.

you said “Arduino is lacking even some very basic scheduling capabilities”.

bperrybap:
Uh… without any scheduling, then nothings works.
EVERY single program schedules things. If not, then nothing ever happens.

is the Arduino lacking scheduling or is it inherent in any sequence of instructions?

gcjr:
you said "Arduino is lacking even some very basic scheduling capabilities".

is the Arduino lacking scheduling or is it inherent in any sequence of instructions?

OK, you got me there.
Technically, Arduino does have primitive scheduling inside loop() and by using delay()
I guess I worded that poorly and should have been clearer.
What Arduino is missing is at least a minimal set of scheduling capabilities for things like
the ability to schedule code to run on a definable repetitive time or elapsed time basis.

--- bill

gcjr ,
The blink-without delay technique is an often proposed solution to provide for the scheduling of code to run after an elapsed time.
Something like this technique or the use of a timer/metro library is necessary because Arduino does not provide any sort of time based scheduling mechanism.

--- bill

bperrybap:
What Arduino is missing is at least a minimal set of scheduling capabilities for things like
the ability to schedule code to run on a definable repetitive time or elapsed time basis.

the first feature Doug Comer discussed in his Xinu book was a timing mechanism that allowed queuing tasks (Xinu is a multi-tasking OS) at various times by managing a linked-list with times for each element relative to the preceding element. this allows a single timer to be used which triggers at the time for the first element on the queue.

but as soon as you add a mechanism like that, you need an infrastructure that services it, and then instead of having to figure out how to use millis() instead of delay(), the programmer needs to figure out how to use the quasi-OS feature.

How many times on this forum is the thread not about a programming issue but the use of some library

there are times when delay() make sense and certainly times when using millis() is more efficient and can be used a multitude of times to manage several different processes independently.

bperrybap:
"Blink without delay" is not really a timer but rather a coding technique of constantly looking at a time based counter to determine elapsed time. ... this technique is a bit too much for quite a large number of Arduino users. ... it doesn't scale very well to more complex environments

Blink-without-delay describes an "idiom" (a pattern) that works well in less complicated applications common with inexperienced coders.

a more experienced coder will no doubt use some library or know how to build a suitable infrastructure for more complicated applications, if needed.

About Xinu: The official Xinu has a Arduino version. It has the core parts of Xinu (and of course, the scheduler for example). Also the Xinu shell, a lib for gpio (and you can turn on/off leds), and several good stuff more.
Links:
http://se.fi.uncoma.edu.ar/xinu-avr/