Scalar vs. primitive data type – are they the same thing?

I don’t think they’re interchangeable. They are frequently similar, but differences do exist, and seems to mainly be in what they are contrasted with and what is relevant in context. Scalars are typically contrasted with compounds, such as arrays, maps, sets, structs, etc. A scalar is a “single” value – integer, boolean, perhaps a string … Read more

What are important languages to learn to understand different approaches and concepts? [closed]

Matters of practicality are highly subjective, so I will simply say that learning different language paradigms will only serve to make you a better programmer. What is more practical than that? Functional, Haskell – I know you said that you didn’t want to, but you should really really reconsider. You’ve gotten some functional exposure with … Read more

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

TL; DR In summary, syntax is the concept that concerns itself only whether or not the sentence is valid for the grammar of the language. Semantics is about whether or not the sentence has a valid meaning. Long answer: Syntax is about the structure or the grammar of the language. It answers the question: how … Read more

What is the difference between Type and Class?

The following answer is from Gof book (Design Patterns) An object’s class defines how the object is implemented. The class defines object’s internal state and the implementation of its operations. In contrast, an object’s type only refers to its interface – a set of requests to which it can respond. An object can have many … Read more

The term “Context” in programming? [closed]

Let’s say you go to the dentist to have a tooth pulled out. When the receptionist asks you for your name, that’s information they need in order to begin the appointment. In this example, your name is contextual information. So in the context of visiting the dentist, you need to provide your name to get … Read more

Dynamic type languages versus static type languages

The ability of the interpreter to deduce type and type conversions makes development time faster, but it also can provoke runtime failures which you just cannot get in a statically typed language where you catch them at compile time. But which one’s better (or even if that’s always true) is hotly discussed in the community … Read more

Why aren’t programs written in Assembly more often? [closed]

Hellо, I am a compiler. I just scanned thousands of lines of code while you were reading this sentence. I browsed through millions of possibilities of optimizing a single line of yours using hundreds of different optimization techniques based on a vast amount of academic research that you would spend years getting at. I won’t … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)