1
vote
1answer
88 views

Why is Throwable initCause designed to be called only once?

I find it really odd that the initCause method of Java's Throwable class can only be called once, or even not at all (if the constructor accepting a Throwable was used). This makes exception chaining ...
1
vote
2answers
205 views

What's the reason of choosing PascalCasing over camelCasing or vice versa from a programming language design POV?

I like both but I notice languages that use camelCasing for members sometimes need more adjustments when you want to edit your code. For example (in Python): node.customData() vs ...
3
votes
1answer
326 views

Is there a name for the 'break n' construct?

In a conversation earlier this week I was discussing certain language features, and I realized I don't have a good word / phrase to describe a particular feature. Some languages, such as PHP, have a ...
3
votes
2answers
296 views

Variable declaration versus assignment syntax

Working on a statically typed language with type inference and streamlined syntax, and need to make final decision about syntax for variable declaration versus assignment. Specifically I'm trying to ...
-2
votes
4answers
291 views

What are the advantages of converting empty strings to evaluate to true as compared to false? [closed]

When converting a string to a boolean, what are the advantages of having a programming language evaluate an empty string as true and what are the advantages of having it evaluate it to false?
-6
votes
4answers
369 views

Why must a constructor's call to the superconstructor be the first call?

It is an error if you do anything in a constructor before calling the superconstructor. I remember that I had problems because of that. Yet, I do not see how this saves us from errors. It could save ...
10
votes
6answers
2k views

In Java, why were protected members made accessible to classes of the same package?

From the official documentation... Modifier Class Package Subclass World public Y Y Y Y protected Y Y Y N no modifier Y Y N ...
2
votes
2answers
1k 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']; ...
1
vote
3answers
945 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 ...
10
votes
8answers
1k 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, ...
1
vote
2answers
159 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
391 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 ...
11
votes
3answers
3k 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 ...
10
votes
7answers
386 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 ...
11
votes
5answers
1k 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 ...
5
votes
2answers
295 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?
0
votes
2answers
1k views

Are there any languages that have both high- and low-level facilities? [closed]

Are there any languages that have both high- and low-level facilities? 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 ...
6
votes
5answers
454 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 ...
11
votes
2answers
508 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 ...
6
votes
3answers
503 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 ...
1
vote
9answers
760 views

The New Programming Language & BCL for the Cloud [closed]

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
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 ...
10
votes
5answers
919 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 ...
3
votes
1answer
160 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?
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
votes
5answers
527 views

'Other' Features in a programming language [closed]

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 ...
18
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 ...