Questions about distinctive aspects of particular computer languages, particularly in the way they are written or in the expressive capabilities provided to the programmer.

learn more… | top users | synonyms

2
votes
9answers
744 views

The New Programming Language & BCL for the Cloud

Let's say you need to implement a new programming language and BCL designed specifically for operating in the cloud (it won't be used on client machines ever). It should be optimized for cloud ...
12
votes
10answers
1k views

Why dynamically typed languages do not let the developer specify the type?

The dynamically typed languages I know never let the developers specify the types of variables, or at least have a very limited support for that. JavaScript, for example, doesn't provide any ...
6
votes
1answer
5k views

A combined if/switch statement syntax with exception handling for a C#-inspired language

It is sometimes necessary to try/catch exceptions inside the "if" condition, but not the body that follows. In C#, this is really rather cumbersome, requiring locals and code that isn't entirely ...
5
votes
6answers
2k views

Programming languages differences and efficiency, does it matter?

I am fairly new to programming, I have studied in computer science for 3 years at college, but as you know, school is only 2% of what really makes one a fully-fledged programmer. I have a lot of ...
10
votes
6answers
534 views

Why binding is not a native feature in most of the languages?

IMHO binding a variable to another variable or an expression is a very common scenario in mathematics. In fact, in the beginning, many students think the assignment operator(=) is some kind of ...
9
votes
7answers
2k views

How do you choose to use a specific programming language?

I was having a small talk between teammates about how you choose a programming language for use in a project which lead me to think that there are many criteria to choose one in the beginning of a ...
10
votes
6answers
625 views

Where, in an object oriented system should you, if at all, choose (C-style) structs over classes?

C and most likely many other languages provide a struct keyword for creating structures (or something in a similar fashion). These are (at least in C), from a simplified point of view like classes, ...
10
votes
5answers
876 views

First Class Functions

I started seriously taking a look at Lisp this weekend (by which I mean I have only been learning Lisp and not reverting back to projects in C#) and must say I love it. I have dabbled with other ...
6
votes
5answers
329 views

Is there a better term than “smoothness” or “granularity” to describe this language feature? [closed]

One of the best things about programming is the abundance of different languages. There are general purpose languages like C++ and Java, as well as little languages like XSLT and AWK. When ...
5
votes
10answers
362 views

Does your workplace allow the use of multiple, interoperable programming languages?

Since now there are several good languages that target the JVM and can interop with Java with varying degrees of painlessness, and likewise for the CLR (especially with the recent addition of F# as an ...
9
votes
4answers
890 views

Is there any reason lazy initialization couldn't be built into Java?

Since I'm working on a server with absolutely no non-persisted state for users, every User-related object we have is rolled out on every request. Consequently I often find myself doing lazy ...
4
votes
1answer
856 views

what are the benefits of closure, primarily for PHP?

I am beginning the process of moving code over to PHP 5.3 and one of the most highly touted features of PHP 5.3 is the ability to use closures. My understanding of closures is that they allow ...
9
votes
5answers
885 views

Why no fortran standard library?

To be a language focused on mathematics and scientific computing, I am always baffled by the total lack of useful mathematical routines in the Fortran standard library. One would expect it to be ...
3
votes
1answer
157 views

feature request in language design?

How do language designers decide when a feature should go in a library as an extension or when it needs to have support from the core language?
47
votes
9answers
14k views

What is a closure?

Every now and then I see "closures" being mentioned, and I tried looking it up but Wiki doesn't give an explanation that I understand. Could someone help me out here?
5
votes
4answers
650 views

Can you name some pattern matching languages for non-strings? [closed]

Regular expressions and are popular matching patterns in strings. What similar handy languages exist to match other data structures? I know XPath for XML trees, but I have not seen use of it for other ...
35
votes
5answers
2k views

When is a feature considered a “First class citizen” in a programming language/platform?

I have seen many times statements like- "Please make this feature a first class citizen in so and so language/platform". For example, it is said about enums in C#/.net. So, when is a feature ...
17
votes
24answers
1k views

Interesting or unique types in programming languages? [closed]

We have all seen integer, floating point, string, and the occasional decimal type. What are some of the most strange or unique or useful types you have encountered, useful or not?
4
votes
6answers
2k views

C++: calling non-member functions with the same syntax of member ones

One thing I'd like to do in C++ is to call non-member functions with the same syntax you call member functions: class A { }; void f( A & this ) { /* ... */ } // ... A a; a.f(); // this is the ...
1
vote
5answers
499 views

'Other' Features in a programming language

Online (i cant remember where) i saw someone mention he wishes programming language has more built in features for tools like documentation and source control. Now i dont understand what needs to be ...
9
votes
3answers
2k views

Why are private variables described in the publicly accessible header file?

OK, so hopefully this is a subjective enough question for Programmers, but here goes. I am continuously broadening my knowledge of languages and software engineering practices... and I've run into ...
14
votes
10answers
924 views

Help me catch up on what I've missed since Java 1.4.2 [closed]

I am about to start my first professional career position as a software developer, and I'm likely going to be writing a lot of Java code. I don't know that much about what specifically I'll be ...
19
votes
16answers
2k views

Why aren't databases integrated as a language feature?

Are there any programming languages that have a built-in database as a first-class language feature rather than connecting to an external SQL (or other) database? What would be the drawbacks and ...
15
votes
9answers
1k views

Are optional parameters helpful or a hindrance to application maintenance?

As stated in the title, are optional parameters, such as those used in C# helpful or are they a hindrance to application maintenance and should be avoided as they can make the code harder to ...
9
votes
7answers
588 views

Are Language Comparisons Meaningful?

Dr Bjarne Stroustrup in his book D&E says Several reviewers asked me to compare C++ to other languages. This I have decided against doing. Thereby, I have reaffirmed a long-standing and ...
6
votes
2answers
501 views

Why would anyone need this java syntax?

One day while trawling through the Java language documentation, as you do, I found this little beauty lurking within Double: 0.25 == 0x1.0p-2 Now, obviously (!) this means take the number ...
2
votes
4answers
298 views

How does language [X] handle indeterminate forms like 0^0?

As x goes to 0, the limits of x^0 and 0^x go to 1 and 0, respectively. Some say that the best value for 0^0 depends on context, others say that the value of 0^0 should be 1. I'm interested in knowing ...
3
votes
5answers
989 views

Which programming languages doesn't use operator precedence besides Lisp like languages? [closed]

And what do you think about operator precedences? Would be harder programming in language where the operations are executed in sequential order? Ex.: 2 + 3 * 4 == 20 2 + (3 * 4) == 24 Ok, Lisp ...