Syntax refers to the set of rules that define how to write a correctly structured program in a language. It explicitly does not deal with the program's meaning or interpretation.
-1
votes
0answers
111 views
Have programming languages shared uniform standards (at least to a degree)? [closed]
Are there any substantial obstacles in implementing at least elementary uniform standards in programming languages? For example, currently constants in some languages are denoted with the keyword ...
1
vote
1answer
192 views
How to write a syntax checker [closed]
How is a syntax checker for a programming language written? I am guessing a grammar has to be written first. How to then proceed?
Motivation
I'm using a programming language (Apex for Salesforce) ...
1
vote
3answers
323 views
Any languages use the '=>' and '=<' operators? [closed]
I'm just curious if there are any programming languages that use the '=>' and '=<' operators for something.
I wonder why these are not commonly used when their variant '<=' and '>=' are so ...
2
votes
1answer
164 views
Why there is no markdown for underline? [closed]
I am wondering why there is no markdown syntax for underline? I know that basic html tags can be embedded to achieve this but I am trying to understand why underline got omitted when bold and italics ...
0
votes
1answer
129 views
Truth condition testing with BOOL
BOOL myBool;
myBool = YES;
...
if (myBool) {
doFoo();
}
I have read that because there are instances where the above does not actually call the doFoo() function, it is best to instead always test ...
3
votes
5answers
466 views
Does relying on intellisense and documentation a lot while coding makes you a bad programmer? [duplicate]
Is a programmer required to learn and memorize all syntax, or is it ok to keep handy some documentation?
Would it affect the way that managers look at coders?
What are the downside of depending on ...
5
votes
4answers
345 views
What makes Common Lisp “big”?
I've been learning both Common Lisp and Racket, and one thing that I consistently hear is that Racket is a much "smaller" language than Common Lisp. I was wondering what this really meant. As far as I ...
14
votes
1answer
359 views
Dollar Sign Blues: Javascript and PHP
I grew up programming C++ and Java where everything was safe and beautiful. Compilers made sure to keep me in check if I ever strayed. Of course, everyone did a little Perl in college, but I didn't ...
2
votes
1answer
128 views
How do I distinguish between things belonging to the standard library, specific gems, and those that are user-generated in Ruby?
I'm a beginning programmer, that for various reasons is using an existing Ruby codebase to learn to program. My goal is to be able to understand and eventually extend this codebase. However, I find it ...
0
votes
2answers
95 views
What Does “The Program Must Process Each Character Before Reading the Next One” Mean?
From the book Think Like a Programmer (emphasis mine)
The Luhn formula is a widely used system for validating identification numbers. Using the original number, double the value of every other ...
2
votes
2answers
157 views
foreach over multiple lists at once
Are there any languages that support foreach over multiple lists at once? Something like this:
foreach (string a in names, string b in places, string c in colors) {
// do stuff with a, b, c
...
2
votes
1answer
86 views
Objective C - nested messages … confusion about
Wonder if anyone could shed some light on this messaging construct:
The documentation says that messages appear btwn brackets [] and
that the msg target/object is on the left, whilst the msg itself ...
2
votes
2answers
85 views
Helper Methods Placement
Here's a question that's always bugged me. I'm going to use java as an example because I've almost never run into a problem in java where I didn't need to use helper methods in its class structure.
...
43
votes
7answers
3k views
Why are semicolons and commas interchanged in for loops?
In many languages (a wide list, from C to JavaScript):
commas , separate arguments (e.g. func(a, b, c)), while
semicolons ; separate sequential instructions (e.g. instruction1; instruction2; ...
33
votes
2answers
1k views
Why do bitwise operators have lower priority than comparisons?
Could someone explain the rationale, why in a bunch of most popular languages (see note below) comparison operators (==, !=, <, >, <=, >=) have higher priority than bitwise operators (&, |, ...