Tagged Questions
1
vote
2answers
244 views
Why does JavaScript count array lengths by the last index?
JavaScript seems to calculate the array length property by the number of the last index in the array rather than counting the number of items in the array. Example:
var testArray = ['a', 'b', 'c'];
...
10
votes
8answers
924 views
Why aren't design patterns added to the languages constructs?
Recently I was talking with a colleague who mentioned that his company was working on adding the MVC design pattern as a PHP extension.
He explained that they wrote C code for adding Controllers, ...
9
votes
5answers
624 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 ...
0
votes
3answers
527 views
Is function overloading in general considered Evil? [closed]
Recently I found about two new programming languages(Vala and google's GO) which don't support method or function overloading and intend on not supporting them in the future ever! The creators of ...
0
votes
5answers
528 views
What is the most concise, unambiguous syntax for operator associated methods (for overloading etc.) that doesn't pollute the namespace?
Python tends to add double underscores before its built-in or overloadable operator methods, like __add(), whereas C++ requires declaring overloaded operators as operator + (Thing& thing) { /* ...
9
votes
3answers
845 views
Appropriate programming language to design music software
I want to design a software for my musical instrument which is a rhythmic one (there is no melody).
All I want these software to do is :
make the user able to compose music
play what user has ...
18
votes
17answers
1k 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 ...
1
vote
2answers
143 views
What are/would be the characterists and applications of a programming paradigm where functions can't have statements?
Suppose there is a language where, instead of statements, functions could only be defined in relation to other functions and operators such as partial application and composition. What would be the ...
6
votes
3answers
374 views
Is there a language where collections can be used as objects without altering the behavior?
Is there a language where collections can be used as objects without altering the behavior?
As an example, first, imagine those functions work:
function capitalize(str)
//suppose this ...
10
votes
7answers
327 views
What is a good alternative to the name variable for a language that only has immutable references or labels?
For example, in functional languages, variables are single assignment and their values are immutable once assigned. So they have two states unbound and bound, once bound they can't be changed.
Is ...
10
votes
5answers
566 views
Is there a specific purpose for heterogeneous lists?
Coming from a C# and Java background, I'm used to my lists being homogeneous, and that makes sense to me. When I started picking up Lisp, I noticed that the lists can be heterogeneous. When I started ...
3
votes
2answers
220 views
C++ users proposals
I believe I have some good suggestions to improve the C++ language. Who should I contact to discuss this? Do I have the chance to be heard, especially if I'm not a renowned expert?
-2
votes
2answers
679 views
Are there any languages that have both high- and low-level facilities?
Are there any? If not, is it feasible to create one? Why or why not?
In theory it would be very helpful to have a programming language that has both shell and regular programming language ...
10
votes
2answers
456 views
How easy should a language development framework be to use?
This is part of a series of questions which focuses on a project called the Abstraction Project, which aims to abstract the concepts used in language design in the form of a framework.
Another ...
88
votes
77answers
13k views
What features would you like to have in PHP? [closed]
Since it's the holiday season now and everybody's making wishes, I wonder - which language features you would wish PHP would have added? I am interested in some practical suggestions/wishes for the ...
5
votes
3answers
324 views
Is structural typing in a hierarchical model necessary?
This is part of a series of questions which focuses on a project called the Abstraction Project, which aims to abstract the concepts used in language design in the form of a framework.
Another ...
6
votes
5answers
362 views
Java without implementation inheritance
In a recent video on Java, Joshua Bloch states at 4 minutes 20 seconds into the video:
And then there's inheritance, and that was a marketing necessity. You know, we can argue whether you really ...
2
votes
9answers
516 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 ...
6
votes
1answer
2k 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 ...
1
vote
5answers
443 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 ...
20
votes
19answers
1k views
What language, or language feature, do you wish made it to the mainstream? [closed]
Some languages in the past have been influential without ever reaching wide adoption. For example, many languages owe much to the design of Algol 68, even though few compilers were ever written for ...
3
votes
1answer
139 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?
3
votes
6answers
998 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 ...