Tag Info

Hot answers tagged

49

Visual Studio doesn't know what code you intend to write so includes the most common namespaces for you by default in the "new class" template. This is done so you don't have to resolve all the references for every single line of new code you write. Once you have written your basic code if you right click and select Organize Usings > Remove and Sort it will ...


42

Ask yourself who the end user is. If it's meant to be written by someone with programming experience in C or Javscript, or IT experience in Unix, then case sensitivity is probably the right thing to do, because that's what the user expects. But for most end-users, even power-users, this will be confusing. VB/VBA/VBScript are case-insensitive, and this was a ...


16

While most likely not a very big difference and programmers would have been able to handle it just the same: "continue" makes it clear that the loop will go on processing data (stop the details, continue the loop), while "skip" could be thought of as terminating the loop totally (like break in C++). It's one of those cases where it can be difficult to find ...


16

You should decide based on the user experience you wish to present, not how easy or hard it is to implement. If it will make it easier for your users to have case insensitivity then that's what you should implement. As a case in point SQL is case insensitive. This makes it very easy to use in an interactive setting. Another way to look at this is will ...


15

You can use it to imitate return type covariance. Eric Lippert's Explanation . Eric provides this example code: abstract class Enclosure { protected abstract Animal GetContents(); public Animal Contents() { return this.GetContents(); } } class Aquarium : Enclosure { public new Fish Contents() { ... } protected override Animal GetContents() ...


14

I imagine that backwards compatibility with perfectly standard code is a more important reason. If you add a keyword that might have been used as a legitimate identifier in previous code, you create a ton of pain, of possible subtle errors, especially in C, a language with somehow complicated parsing rules. If these identifiers were used as a public ...


12

I guess it might have to do with history of programming languages. To ask why it is continue in Java is to ask why it is continue in C++, which is to ask why it is continue in C, Algol etc. To my knowledge, Fortran was the first to have a CONTINUE statement, actually a no op. It was just there to make it possible to place a (numeric) label used in goto or ...


11

Programming languages should be case-sensitive, period. People can adjust to this very easily: they simply have to remember to work mostly in lower case, and to watch out for mixed-case or all-caps identifiers in existing API's. It once seemed obvious to make languages case-insensitive. This is because lower case was not available on all computing systems ...


6

The real determining factor is how often you're going to want to have multiple things with the same name. Case insensitivity works in SQL because it's not often you want a column named SELECT. It would be annoying in Java because every other line looks like Object object = new Object(), where you want the same name to refer to a class, an instance, and a ...


5

The term late or dynamic binding describes how the identifier is resolved into the actual implementation of the method, it doesn't describe how the virtual method is used. If any of those would have been used to describe the method, something like late-bound or dynamically-bound would have been used, which is not only long-winded, but also a bit too close to ...


5

Assumed your script language will be case sensitive - are you going to create a compiler or syntax checker that will tell the user if he makes a typo by using the wrong case in a variable name or a keyword? If not, that would be a very strong argument for making the language case insensitive.


5

Yes you can remove any using directive that is not being used.These directives are automatically added by visual studio since they are the most commonly used ones and if for instance you are not going to use linq in the interface then you can remove the directive System.Linq; The same holds true for other directives as well.Also it is a good practice in ...


4

Can you declare variables on-the-fly ? If so i would argue against case sensitive, as tracking down a bug caused by ATypo = 42; as opposed to Atypo = 42; is needlessly asking for debugging time, when having the two statements equivalent just makes life easier.


4

Names beginning with an underscore and a capital letter (and anything with double underscore) were reserved for compiler/standard library implementation in previous standards. From Reserved Identifiers of C89 and C99: Also reserved for the implementor are all external identifiers beginning with an underscore, and all other identifiers beginning with ...


3

The word itself was introduced with SIMULA-67. Ole-Johan Dahl's history indicates that the introduction of 'virtual' into SIMULA occurred just before May 1967, just in time to be included in the paper Class and Subclass declaration that was presented at the IFIP TC2 Conference on Simulation Programming Languages. However, there is no note to indicate why ...


3

DrRacket maintains a list of keywords that it understands for auto-indentation, which you can find in the Preferences (under Editing->Indenting). If an identifier is listed as a keyword for indentation, then DrRacket will also highlight it differently if the chosen color scheme differentiates keywords from plain identifiers. Identifiers like + are not ...


3

These default using statements are part of your default template when creating interfaces. You can always edit the template to have them removed. See this question for more details.


3

It's telling the reader that "I deliberately hid the base class' implementation of this method", as opposed to accidentally.


3

I think it is there in case you might need it to do something the language designers might not have thought of. C# was in many ways a reaction to early versions of java. And one thing java did was to very explicitly pigeonhole developers to eliminate possiblities of developers shooting themselves in the feet. C# took a slightly different approach and gave ...


2

Examples of languages like FORTRAN, BASIC, SQL are given saying that these are case insensitive. The reason why FORTRAN and SQL (and COBOL) are case insensitive is that they were originally designed for use on machines where the normal character sets had only uppercase letters. Case insensitivity in those languages (at least) is more a historical ...


2

This is more of a historical curiosity, but Visual Basic for Applications, the scripting language of Office, used to use localized keywords in some early versions of Word and Excel. Luckily, that madness was over soon, and with Office 97 they switched back to a locale-independent set of keywords (which happened to be English). Here's an example quoted from ...


2

I know there are something like chinesepython which you could use Chinese to write python. Though I don't know is there a big project written by it.


1

There's also polish programming language. it's called ZDICH As you can see on screenshots, you must write every statement and expression in polish, like piszl (writel), Koniecv(End) to compile the code.


1

Algol 68 was divided in a core language and a representation one. The representation could be based on a different language, for instance the official French translation of the report defining Algol 68 had French keywords. (I don't know how much they were used, I used a version which had English keywords). There have been also basic variants used for ...


1

the & in (defn full-name [& {first :first last :last}] indicates that all the remaining arguments should be gathered into a single collection. the map destructuring form following the & then takes the map created by the & apart again. (defn full-name [& {first :first last :last}]...) (full-name :first "Tom" :last "Brennan") without the ...


1

From my personal experience I don't see a big difference between case sensitive and insensitive languages. More important thing is naming and structural conventions that a programmer should keep in his code and no compiler or parser checks it for him. If you stick to some kind of rules you will easily know a proper name (you won't think if you named a ...



Only top voted, non community-wiki answers of a minimum length are eligible