Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [keywords]

The tag has no usage guidance.

2
votes
1answer
2k views

C# design to force the virtual method to be called from the override, or something similar

We can do something like this: // in base class protected virtual void Init(){ //do stuff that all objects need to do } //in derived class protected override void Init(){ base.Init(); // if ...
1
vote
0answers
39 views

Can Attribute and Property, Method and Function be used inter-changeably in Software world?

Some pairs like these: Method and Function Attribute and Property Argument and Parmameter etc. I use all the three pairs interchangeably when I speak to a peer. Do they have a very critical ...
1
vote
2answers
269 views

Was including a keyword for events a mistake in C#?

C# has events built in with a keyword. So if you want to declare an event, you write: public event MyEventHandler SomethingHappened; It is convenient, as it does allow you to add multiple event ...
3
votes
1answer
82 views

What approaches can I take to figure out the “relevancy” of certain terms in a string?

I'm not even sure "relevancy" is the most accurate word, so I'll just describe the problem: I'm building an app that needs to somehow parse product descriptions from a popular website (let's just say ...
-6
votes
6answers
280 views

What would be generally accepted shorter version of `const`? [closed]

Now that we have const implemented javascript we can use it to declare variables. But unlike let or var it is 5-character long and I believe it is a big deal actually. Something that even slightly ...
0
votes
3answers
607 views

Is there a common “class=>clazz” equivalent for "interface?

In most languages I've used it's common practice to replace the reserved word class with clazz when you have a variable that refers to a class. This has become a sort of de facto convention, to the ...
5
votes
2answers
230 views

Why was the static keyword used here?

In standard C, you have a few options for declaring a function that accepts a pointer to a chunk of data: void style_1(int * arr); void style_2(int arr[]); void style_3(int arr[10]); void style_4(...
3
votes
3answers
299 views

Can Lisp keywords be protected?

Why aren't lisp keywords protected? For example, (define a 3) (define define +) #makes define useless (define a 1) #outputs 4, instead of assigning 1 to a. Is this flexibility so important? Or even ...
14
votes
2answers
1k views

Now that not all method declarations in a Java Interface are public abstract, should the methods be declared with these modifiers?

Starting with Java 8, default methods were introduced into interfaces. Effectively, this means that not all methods in an interface are abstract. Starting with Java 9 (maybe), private methods will be ...
16
votes
4answers
2k views

Why does C# have both out and ref?

C# has the out and ref keywords. Why are these two required? Disclaimer: I don't have deep knowledge of C#.
31
votes
1answer
5k views

Why does C++ not have a “pure” keyword for virtual functions?

I have always wondered why we code virtual void MyFunction() = 0; and not pure virtual void MyFunction(); Is there a reference for the basis of this decision?
3
votes
3answers
3k views

Why does an interface extend an interface instead of implementing it?

In Java suppose that I have interface A: public interface A { // foo } I also have interface B: public interface B extends A { // foo + bar } Why does interface B extend interface A and ...
1
vote
1answer
960 views

Why VB local variables can be 'static', not 'shared'?

In Visual Basic .NET, I can see different keyword for the same(?) concept: • methods Shared • properties Shared • class-level variables Shared BUT • local variables ...
11
votes
2answers
2k views

Why is the 'out' keyword used in two seemingly disparate contexts?

In C#, the out keyword can be used in two different ways. As a parameter modifier in which an argument is passed by reference class OutExample { static void Method(out int i) { i = ...
0
votes
1answer
1k views

why “new” keyword is not contextual keyword?

Based on: C# Keywords Keywords are predefined, reserved identifiers that have special meanings to the compiler. and Based on: Contextual Keywords A contextual keyword is used to provide a ...
4
votes
2answers
312 views

Etymology of 'virtual' (method/method table/inheritance)

As far as I know, it generally refers to late or dynamic bindng. So why a word like late or dynamic wasn't used?
5
votes
1answer
386 views

Why does DrRacket IDE considers some identifiers as “symbols” and some as “keywords”? What is the difference?

Why does DrRacket (kind of Scheme) IDE highlights some of the identifiers as "keywords" (for example define, lambda, send*), and the others as "symbols" (user defined identifiers, +, -, abs, send, ...
11
votes
5answers
10k views

When is the register keyword actually useful in C?

I am confused about the use of register keyword in C. It is generally told that its use isn't needed like in this question on stackoverflow. Is this keyword totally redundant in C due to modern ...
15
votes
2answers
4k views

Why the ugly keywords in C11?

I am currently reading a draft of the C11 specification. The new introduced keywords: _Bool, _Alignof, _Atomic all feel like custom extensions, instead of standard reserved keywords like struct, union,...
5
votes
3answers
683 views

Why the name 'continue' [closed]

The 'continue' keyword in Java (and probably in many other programming languages) is used to skip further execution of the current iteration. Why was the name 'continue' chosen? Why not something ...
16
votes
5answers
3k views

Use of keyword “Using” in C# interface

When I'm using C# to write some code and I define an interface using Visual Studio 2010, it always includes a number of "using" statements (as shown in the example) using System; using System....
1
vote
1answer
2k views

Understanding clojure keywords

I'm taking my first steps with Clojure. Otherwise, I'm somewhat competent with JavaScript, Python, Java, and a little C. I was reading this artical that describes destructuring vectors and maps. E.g. ...
31
votes
13answers
3k views

Case insensitive keywords in a language [closed]

We're trying to write a custom scripting language. There has been a suggestion to make the language forgiving by providing case insensitive keywords. I personally do not like the idea, but there are ...
21
votes
5answers
8k views

What are some practical uses of the “new” modifier in C# with respect to hiding?

A co-worker and I were looking at the behavior of the new keyword in C# as it applies to the concept of hiding. From the documentation: Use the new modifier to explicitly hide a member inherited ...