A language feature is a distinct aspect of a programming language, such as binding rules, lexical design, or facets of the type system.
Questions tagged [language-features]
618 questions
15
votes
3 answers
Who invented the throw/try/catch[/finally] kind of error handling?
My questions are more of historical nature than practical:
Who invented it?
Which language used it first (and to what extent)?
What was the original idea, the underlying concept (which actual problems had to be solved these days, papers welcome)…

Frunsi
- 7,099
- 5
- 36
- 42
15
votes
2 answers
Should I use new Haskell language extensions in favour of the old ones?
When starting a new Haskell project which needs language features that are offered by both new and older extensions, which should I use? The new one or the old one? For example:
GADTs supersede ExistentialQuantification.
TypeFamilies in many cases…

Petr
- 62,528
- 13
- 153
- 317
14
votes
6 answers
What is an example of "this" assignment in C#?
Does anybody have useful example of this assignment inside a C# method? I have been asked for it once during job interview, and I am still interested in answer myself.

Alexander Prokofyev
- 33,874
- 33
- 95
- 118
14
votes
20 answers
Should inheritance (of non-interface types) be removed from programming languages?
This is quite a controversial topic, and before you say "no", is it really, really needed?
I have been programming for about 10 years, and I can't honestly say that I can recall a time where inheritance solved a problem that couldn't be solved…

John Sonmez
- 7,128
- 5
- 37
- 56
14
votes
3 answers
What advantages does Scala have over Java for concurrent programming?
How can scala make writing multi-threaded programs easier than in java? What can scala do (that java can't) to facilitate taking advantage of multiple processors?

Gordon Gustafson
- 40,133
- 25
- 115
- 157
14
votes
2 answers
Is there an authorative programming language feature list?
I'm looking for things like Dynamic typing, Static Typing, Weak Typing, and Strong Typing.
As well as OO features like polymorphism, inheritance, nested classes, inner classes, abstract classes, pure virtual functions.
Also, things like reflection,…

Derek Litz
- 10,529
- 7
- 43
- 53
14
votes
8 answers
Algorithm that converts numeric amount into English words
What is the most efficient way to convert numeric amount into English words
e.g. 12 to twelve
127 to one hundred twenty-seven

DuduAlul
- 6,313
- 7
- 39
- 63
14
votes
14 answers
A real use for `as` and `is`
I have -never- used as or is in C# or any language that supports the keyword.
What have you used it for?
I dont mean how do i use it i mean how have you actually need it?
I also got away with doing no typecasting in a fairly large c++ project (i…
user34537
13
votes
2 answers
Any differences between asInstanceOf[X] and toX for value types?
I used IntelliJ's ability to convert Java code to Scala code which generally works quite well.
It seems that IntelliJ replaced all casts with calls to asInstanceOf.
Is there any valid usage of asInstanceOf[Int], asInstanceOf[Long] etc. for value…

soc
- 27,983
- 20
- 111
- 215
13
votes
8 answers
In which languages is it a security hole to use user-supplied regular expression?
Edit: tchrist has informed me that my original accusations about Perl's insecurity are unfounded. However, the question still stands.
I know that in Perl, you can embed arbitrary code in a regular expression, so obviously accepting a user-supplied…

Ryan C. Thompson
- 40,856
- 28
- 97
- 159
13
votes
8 answers
What is the name of a [foo, bar] = ["foo", "bar"] feature?
I need to know a correct name for this cool feature that some languages provide.
FYI: In some languages it is possible to do a multiple assignments by assigning a structure of values to a structure of "variables". In the example in the question…

tillda
- 18,150
- 16
- 51
- 70
13
votes
7 answers
What are the features of dynamic languages (like Ruby or Clojure) which you are missing in Scala?
What do you lose in practice when you choose a statically-typed language such as Scala (or F#, Haskell, C#) instead of dynamically-typed ones like Ruby, Python, Clojure, Groovy (which have macros or runtime metaprogramming capabilities)? Please…

Alexey
- 9,197
- 5
- 64
- 76
13
votes
4 answers
Why can this kind of statement work in PHP?
$user->Phonenumbers[]->phonenumber = '123 123';
$user->Phonenumbers[]->phonenumber = '456 123';
$user->Phonenumbers[]->phonenumber = '123 777';
I've never seen this kind of syntax
EDIT
This seems more probably a feature,do you guys know how can I…

ORM
- 465
- 1
- 4
- 8
13
votes
10 answers
How can I find the current Windows language from cmd?
I would like to run a script for each language.
I need a way to find which os language is being used, using batch files.
Both on windows XP, and on Windows 7.
user194942
13
votes
5 answers
Is there a way to escape root namespace in VB?
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
System.Text.MyCustom mc = new System.Text.MyCustom();
}
}
}
namespace System.Text
{
public class MyCustom {…

Shimmy Weitzhandler
- 101,809
- 122
- 424
- 632