Community Digest

Top new questions this week:

Why does JavaScript use autoboxing?

JavaScript has a handful of primitive types such as strings and numbers. However, when doing something fancy, it often wraps these types inside temporary objects in order to use object methods, a ...

object-oriented javascript  
user avatar asked by Manngo Score of 8
user avatar answered by Michael Homer Score of 19

Is there something better than async in order to avoid dead or unused processing times in single thread?

I recently read about PHP's true async RFC. The initial real life "picture" (unrelated to PHP or sync processing) that I imagined was a waiter in a restaurant. He/She/It works async, taking ...

async runtime-performance  
user avatar asked by marius-ciclistu Score of 2
user avatar answered by Eric Lippert Score of 3

Greatest hits from previous weeks:

Why do many template languages have `for-else` statements?

I've noticed that many template engines have a mechanism for detecting that a loop is not occurring. Although their names and syntax vary, they all have this similar structure. For example: Jinja <...

syntax syntactic-sugar template-languages  
user avatar asked by Aster Score of 22
user avatar answered by ratchet freak Score of 45

The square bracket dance: declaring an array in Go, Java, C++ makes the bracket [] going from the left to right. What are the underlying motives?

I've learned multiple languages during my developer life. When I'm switching from one to another, I'm falling in plenty of "small things to remember". Some have a reason I'm knowing, but ...

language-design arrays  
user avatar asked by Marc Le Bihan Score of 21
user avatar answered by Matthieu M. Score of 18

Why do some languages have both immutable "variables" and constants?

Some programming languages (Rust is one I can think of off the top of my head) provides mechanisms to have immutable variables but they also have constants. Isn't an immutable variable just a constant?...

variables immutable  
user avatar asked by QAH Score of 24
user avatar answered by apropos Score of 33

What are the pros and cons of having a unit type over C-like void?

Unit types are types found in more modern languages, replacing void in the C-family languages. Unlike void, a unit type has an ...

types unit-type  
user avatar asked by Seggan Score of 30
user avatar answered by Davislor Score of 35

Why would accessing uninitialized memory necessarily be undefined behavior?

In C, accessing any indeterminate/uninitialized memory is undefined behavior, period. Even in the case that the type in question is guaranteed to have no trap representations, such as ...

c memory-safety undefined-behavior  
user avatar asked by CPlus Score of 23
user avatar answered by kaya3 Score of 20

Why can C not be lexed without resolving identifiers?

I’ve seen it said before that C and C++ cannot be lexed without resolving identifiers to an extent. A common example is (a)*b, which could be either multiplication <...

c lexing  
user avatar asked by Bbrk24 Score of 18
user avatar answered by Michael Homer Score of 16

Does Python's semicolon statement ending feature have any unique use?

Python does not usually use explicit line-ending characters; the parser can almost always figure out where a statement ends from the positioning of newlines. However, Python's syntax allows you to use ...

syntax parsing python  
user avatar asked by Ginger Score of 16
user avatar answered by abel1502 Score of 42
You're receiving this message because you subscribed to the Programming Language Design and Implementation community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 14 Wall Street, 20th Floor, New York, NY 10005

<3