Questions involving the design and structure of programming languages.

learn more… | top users | synonyms

4
votes
7answers
580 views

Is it wrong to copy ideas from other languages?

In the making of a programming language, is it wrong to copy features and ideas from other programming languages? If it is not a problem, why not? Is it possible to license and copyright these things? ...
41
votes
9answers
31k views

Why use partial classes?

In my understanding, the partial keyword does nothing but allow a class to be split between several source files. Is there any reason to do this other than for code organization? I've seen it used for ...
5
votes
2answers
515 views

What do you think of an interpreter written in Java? [closed]

I am currently working on the implementation of a new programming language, for fun. I realize that most languages never become popular, but I still want the language to have a high-quality ...
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 ...
18
votes
13answers
1k views

Should data structures be integrated into the language (as in Python) or be provided in the standard library (as in Java)?

In Python, and most likely many other programming languages, common data structures can be found as an integrated part of the core language with their own dedicated syntax. If we put LISP's integrated ...
15
votes
16answers
5k views

What can be done to programming languages to avoid floating point pitfalls?

The misunderstanding of floating point arithmetic and its short-comings is a major cause of surprise and confusion in programming (consider the number of questions on Stack Overflow pertaining to ...
10
votes
5answers
883 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 ...
14
votes
18answers
3k views

What do you think was a poor design choice in Java? [closed]

Java has been one of the most (the most?) popular programming languages till this day, but this also brought controversy as well. A lot of people now like to bash Java simply because "it's slow", or ...
5
votes
1answer
421 views

Why are Javascript for/in loops so verbose?

I'm trying to understand the reasoning behind why the language designers would make the for (.. in ..) loops so verbose. For example: for (var x in Drupal.settings.module.stuff) { alert("Index: " ...
14
votes
9answers
3k views

Career advice: PhD in theory of programming languages [closed]

I'm very interested in the theories of programming languages and going to apply a PhD in this topic, but I want to know more about the career after the graduate education. besides being a professor, ...
6
votes
5answers
282 views

Is it relevant to warn about truncating real constants to 32 bits?

I'm toying around with LLVM and looking at what it would take to make yet another strongly-typed language, and now that I'm around the syntax, I've noticed that it seems to be a pet peeve of strongly ...
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?
3
votes
2answers
234 views

Greater than or identical to?

While browsing my code in a weakly-typed language I was seeing that I've trained myself to use identity (===) where logical. Then I came across a greater (or less) than or equal to (>=), and it ...
7
votes
4answers
1k views

Building a DSL: Scripted atop a general-purpose language or stand-alone?

I'm debating designing a domain specific language to simplify a given, obscure programming model. Part of the debate is whether to build it (as a script) atop an existing language/runtime (e.g. Java) ...
10
votes
8answers
562 views

Is it possible to design a language that doesn't have syntax errors? [closed]

In other words, a language where every possible string is valid syntax? EDIT: This is a theoretical question. I have no interest in using such a language; I'm just asking whether it's possible.
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 ...
4
votes
3answers
282 views

Comparison of languages by usage type? [closed]

Does anyone know of a good place to go find comparisons of programming languages by the intended platform/usage? Basically, what I want to know, is of the more popular languages, which ones are meant ...
1
vote
5answers
502 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 ...
6
votes
6answers
494 views

Preferred lambda syntax?

I'm playing around a bit with my own C like DSL grammar and would like some oppinions. I've reserved the use of "(...)" for invocations. eg: foo(1,2); My grammar supports "trailing closures" , ...
9
votes
5answers
10k views

What to do if I hate C++ header files?

I was always confused about header files. They are so strange: you include .h file which doesn't include .cpp but .cpp are somehow compiled too. Recently I joined a team project, and of course, ...
2
votes
1answer
801 views

What source code organization approach helps improve modularity and API/Implementation separation?

Few languages are as restrictive as Java with file naming standards and project structure. In that language, the file name must match the public class declared in the file, and the file must live in ...
36
votes
26answers
2k views

What do you wish language designers paid attention to? [closed]

The purpose of this question is not to assemble a laundry list of programming language features that you can't live without, or wish was in your main language of choice. The purpose of this question ...
4
votes
8answers
1k views

How common are circular references? Would reference-counting GC work just fine?

How common are circular references? The less common they are, the fewer hard cases you have if you are writing in a language with only reference counting-GC. Are there any cases where it wouldn't ...
13
votes
4answers
1k views

Why exactly can't PHP have full unicode support?

Everybody knows, that PHP has problems with Unicode. Version 6 is effectively abandoned, because of Unicode implementation difficulties. But I wonder if anyone knows what are the exact reasons? ...
5
votes
3answers
846 views

Is macros support in a programming language considered harmful?

The first abuse that comes to my mind in C is: #define if while But at the same time it is extremely handy and powerful when used correctly. Something similar happens with Common Lisp macros. ...
19
votes
10answers
7k views

What do Java developers think of Scala? [closed]

I've noted that IDE support is nowhere near as good, but the language itself supports functional programming idioms much more cleanly.
5
votes
7answers
504 views

Long Keywords like `function` and `namespace`

In many English-based programming languages like C++ and JavaScript, there exist long keywords like function, namespace, exception (in OCaml languages) and such. Do you think shorter keywords like ...
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 ...
11
votes
9answers
1k views

XAML - Like/Dislike? [closed]

After bashing my head against the brick wall that is XAML, I've decided to come here and ask other people if they are as frustrated as I am. So, Do you like XAML? Please justify. Is XAML the ...
31
votes
10answers
2k views

What mistakes do language writers often make which doom their language? [closed]

Are there common mistakes that language creators make that prevent or slow the adoption of their language? An example (though perhaps not a good one): they focus more on language semantics than tool ...
1
vote
1answer
327 views

Could you blend java and javascript? [closed]

As a developer who spends most of my time in either Java or Javascript these days, I have this fantasy about a language that blends the two of them together. I'm always missing something from one or ...
30
votes
12answers
8k views

Should I use a parser generator or should I roll my own custom lexer and parser code?

What specific advantages and disadvantages of each way to working on a programming language grammar? Why/When should I roll my own? Why/When should I use a generator?
6
votes
3answers
541 views

Practical Meta Programming System (MPS)

This is in regards to Meta Programming System or MPS by JetBrains. Thus far, from my efforts to learn how to use MPS, I have only learned its basic purpose and that it is very complex. Is MPS worth ...
72
votes
20answers
9k views

Are null references really a bad thing?

I've heard it said that the inclusion of null references in programming languages is the "billion dollar mistake". But why? Sure, they can cause NullReferenceExceptions, but so what? Any element of ...
13
votes
5answers
908 views

Question about Creating a Scripting Language

Say, for example, I wanted to pay somebody to create a programming language or scripting language for me. What type of document would they need, in order to fully understand what it is exactly that I ...
11
votes
10answers
1k views

Function overloading? Yes or no [closed]

I'm developing a statically- and strongly-typed, compiled language, and I'm revisiting the idea of whether to include function overloading as a language feature. I realized that I'm a little bit ...
3
votes
10answers
1k views

Do you find languages with indentation requirements cumbersome?

Thoughts on these? Python is one example, and no this is not a stab against Python I like the language. What languages have a indentation requirement?
38
votes
15answers
3k views

How would you design a programming language? [closed]

If you were to design a programming language, how would you do it? What features would you put in? What would you leave out? Statically or dynamically typed? Strongly or weakly typed? Compiled or ...