user41397: It's my understanding that the following lines are equivalent. They seem to be interchangeable in my sketch:
DDRB = 1<<DDB0;

and
pinMode(0, OUTPUT);

Is the first form (DDRB...) setting a micro-controller address directly? Is that assembler?
And is the second form (pinMode) using an included library? Maybe the avr/io.h library?
On a Digispark ATTiny85.

user30039: 
DDRB

is a register. Exactly: Port B Data Direction Register. See datasheet for ATtiny, chapter 10.4. Register Description and 10.2.1 Configuring the Pin. This part will explain why 

DDB0

value was used.
Using this way of setting direction of a pin is much faster than  pinMode(0, OUTPUT);
The possible problem is when you want to use same code to program different Arduino. In this case you have to remember to check all direct registers operations.

user4143: Yes, on a simple microcontroller like the ATTiny the two lines of code are equivalent.  The function pinMode(...) just looks up what pins relate to what ports in a table and set the right registers.
Using DDRB instead of pinMode(...) is fine as long as you are never going to run your code on anything else (or give it to anyone else to run), since you have now hard coded into your sketch what pins are to be used. It is more efficient to use DDRB though. You sacrifice portability for efficiency.
However, for more complex microcontrollers that have many many functions on a single pin, just manipulating DDRB (or the equivalent on the target microcontroller) may not be enough. You may need to switch the pin into GPIO mode, disable analog inputs on the pin, or other operations as well. All that will be wrapped up in the pinMode(...) function for you by the Arduino API so you don't need to worry about it.
So, in short, if you don't care about portability, and you do care about efficiency and code size (which may well be the case on an ATTiny) then yes use DDRB and its friends. 

41397: <p>It's my understanding that the following lines are equivalent. They seem to be interchangeable in my sketch:</p>

<pre><code>DDRB = 1&lt;&lt;DDB0;
</code></pre>

<p>and</p>

<pre><code>pinMode(0, OUTPUT);
</code></pre>

<p>Is the first form (<code>DDRB...</code>) setting a micro-controller address directly? Is that assembler?</p>

<p>And is the second form (<code>pinMode</code>) using an included library? Maybe the <code>avr/io.h</code> library?</p>

<p><em>On a Digispark ATTiny85</em>.</p>
 30039: <blockquote>
  <p>DDRB</p>
</blockquote>

<p>is a register. Exactly: Port B Data Direction Register. See <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet.pdf" rel="nofollow noreferrer">datasheet</a> for ATtiny, chapter 10.4. Register Description and 10.2.1 Configuring the Pin. This part will explain why </p>

<blockquote>
  <p>DDB0</p>
</blockquote>

<p>value was used.
Using this way of setting direction of a pin is much faster than  <code>pinMode(0, OUTPUT);</code><br>
The possible problem is when you want to use same code to program different Arduino. In this case you have to remember to check all direct registers operations.</p>
 4143: <p>Yes, on a simple microcontroller like the ATTiny the two lines of code are equivalent.  The function <code>pinMode(...)</code> just looks up what pins relate to what ports in a table and set the right registers.</p>

<p>Using <code>DDRB</code> instead of <code>pinMode(...)</code> is fine as long as you are never going to run your code on anything else (or give it to anyone else to run), since you have now hard coded into your sketch what pins are to be used. It is more efficient to use <code>DDRB</code> though. You sacrifice portability for efficiency.</p>

<p>However, for more complex microcontrollers that have many many functions on a single pin, just manipulating <code>DDRB</code> (or the equivalent on the target microcontroller) may not be enough. You may need to switch the pin into GPIO mode, disable analog inputs on the pin, or other operations as well. All that will be wrapped up in the <code>pinMode(...)</code> function for you by the Arduino API so you don't need to worry about it.</p>

<p>So, in short, if you don't care about portability, and you do care about efficiency and code size (which may well be the case on an ATTiny) then yes use <code>DDRB</code> and its friends. </p>
