Top "Semantics" questions

The study of meaning as it applies to programming languages

boolean in an if statement

Today I've gotten a remark about code considering the way I check whether a variable is true or false in …

javascript semantics
Is there a difference between "==" and "is"?

My Google-fu has failed me. In Python, are the following two tests for equality equivalent? n = 5 # Test one. if n == 5: …

python reference equality semantics
Finding the id of a parent div using Jquery

I have some html like this: <div id="1"> <p> Volume = <input type="text" /> <…

jquery dom semantics
Should I put input elements inside a label element?

Is there a best practice concerning the nesting of label and input HTML elements? classic way: <label for="myinput"&…

html semantics
What is the difference between syntax and semantics in programming languages?

What is the difference between syntax and semantics in programming languages (like C, C++)?

syntax programming-languages semantics
When is a language considered a scripting language?

What makes a language a scripting language? I've heard some people say "when it gets interpreted instead of compiled". That …

programming-languages scripting terminology semantics
count vs length vs size in a collection

From using a number of programming languages and libraries I have noticed various terms used for the total number of …

collections naming-conventions terminology semantics
Are semantics and syntax the same?

What is the difference in meaning between 'semantics' and 'syntax'? What are they? Also, what's the difference between things like "…

syntax terminology semantics
Checking for empty arrays: count vs empty

This question on 'How to tell if a PHP array is empty' had me thinking of this question Is there …

php arrays performance standards semantics