Top "Language-design" questions

A tag for questions related to the design of any aspect of programming languages.

Does R have an assert statement as in python?

a statement that checks if something is true and if not prints a given error message and exits

r assert language-design assertions
Why Python language does not have a writeln() method?

If we need to write a new line to a file we have to code: file_output.write('Fooo line \…

python syntax history language-design
Why doesn't Scala have static members inside a class?

I know you can define them indirectly achieve something similar with companion objects but I am wondering why as a …

class scala static language-design static-members
Zero-based month numbering

Some popular programming languages use month numbering which is off by 1 -- JavaScript comes to mind, as does Java, and …

date language-agnostic language-design
Factors in R: more than an annoyance?

One of the basic data types in R is factors. In my experience factors are basically a pain and I …

r language-design internals r-factor
Why can't I inherit from int in C++?

I'd love to be able to do this: class myInt : public int { }; Why can't I? Why would I want to? …

c++ inheritance integer language-design strong-typing
Why does C# disallow readonly local variables?

Having a friendly debate with a co-worker about this. We have some thoughts about this, but wondering what the SO …

c# immutability language-design readonly
Why does C# not allow generic properties?

I was wondering why I can not have generic property in non-generic class the way I can have generic methods. …

c# generics properties language-design language-specifications
Why does COBOL have both `SECTION` and `PARAGRAPH`?

Why does COBOL have both SECTION and PARAGRAPH? Can anybody explain why the designers of COBOL created both SECTIONs and …

language-design cobol
Why are references not reseatable in C++

C++ references have two properties: They always point to the same object. They can not be 0. Pointers are the opposite: …

c++ pointers reference language-design