Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
6  
lol, isnt that how languages are made? –  Trevor Arjeski Apr 29 '11 at 3:18
1  
Simply copying is wrong, because there's no progress in that. You need at least some level of refinement. But you'll hardly get anywhere useful, if you start from scratch. –  back2dos Apr 29 '11 at 11:07

7 Answers 7

Is it "wrong"? In what sense could it possibly be wrong? Every programming language ever designed (except, I suppose, for the mythical Ur example) has borrowed concepts and designs from other languages. It's possible (and rather easy) to plot all extant languages on a family tree that shows their derivation. I can give you nearly endless examples of modern languages and the ideas they copied from older languages. Take the Simula -> Smalltalk -> Ruby lineage. Take the ML -> Caml -> OCaml lineage. I could go on and on.

As to your last question: you cannot copyright an idea. You cannot license an idea. Ideas are free in the truest sense (pathological US patent law notwithstanding).

The best languages available today are built on the best ideas of previous languages. Not only is it not "wrong", it's the best (only?) way to design a language.

As Newton famously uttered, we stand on the shoulders of giants.

share|improve this answer
1  
Alan Cooper's quote was better: "It has been said that the great scientific disciplines are examples of giants standing on the shoulders of other giants. It has also been said that the software industry is an example of midgets standing on the toes of other midgets." –  Cyclops Apr 29 '11 at 12:24
1  
@Carson63000 -- hey, I quoted him first! (vide infra) –  Malvolio Apr 29 '11 at 16:56
    
For example, here's an old tree of programming languages –  Izkata Jan 18 '13 at 19:23

Given C#'s similarity to Java, which was influenced by C++, which is an extension of C, which was derived from B, which was derived from BCPL, etc., etc., etc., I'd say the answer is "no". It's very rare to find a language that isn't influenced by or a direct extension of existing languages.

Language design is evolutionary; you take something which sort of works and try to improve on it.

share|improve this answer
    
C++ started as C with a rough copy of Simula 67's classes. –  David Thornley Apr 29 '11 at 15:25

I think the main decision point should be does the feature work well with the other features in the language and is it a feature you think the language should support.

An example would be Java where the design decision was made to exclude operator overriding from the language. Personally I am ambivalent about this decision, as I would love to have that feature available but I have also seen extremely bad examples of misuse.

A counter example would perhaps be the inclusion of "classes" in VB 4. They were not fully implemented or integrated and probably should not have been included.

PL/X as a language was extremely PL/1 like (funny that) but included many built in functions that were borrowed directly from assembler. It was also the only language I think of off the top of my head that had two versions of substring, one substring(start point, end point) and one substring(start point, number of characters). I realise that you can always derive one from the other but it was nice not to have to.

share|improve this answer

You mean, can you put an increment operator in your language even though it's already in C and C++ and Java? Yes, you can -- and obviously should.

Most language are very closely derived from antecedent languages (C comes from BCPL, C++ comes from C, Java comes from C++, and so on.) If you want to invent a language that is just like Java except that the switch statement doesn't fall through, go right ahead.

If I have seen a little further it is by standing on the shoulders of Giants. -- Isaac Newton

share|improve this answer
1  
I'm not sure that all languages require an increment operator :p Nice jab about Java's switch statement btw. –  Rein Henrichs Apr 29 '11 at 2:34
    
Pascal based languages use the compiler magic Inc(i, n); instead. Unfortunately Inc is treated as a procedure (void) rather than a function, however the simpler for (for i := 0 to 9 do... construct makes this less necessary. –  Gerry Apr 29 '11 at 3:02
    
Many languages treat integers as immutable, making "increment" or "decrement" operators impossible. Some languages treat all values as immutable. –  Rein Henrichs Apr 29 '11 at 3:57
    
@ReinHenrichs -- integers are immutable. In a most languages, the variables that contain them are mutable (can be set to different integers). In a few languages, variables are immutable (or more strictly, there are no variables, only identifiers) -- Haskell and Clojure are two good examples. I'm not aware of any language where integer-typed identifiers are always immutable but other types are not. –  Malvolio Apr 29 '11 at 4:02
2  
@ReinHenrichs -- Are you under the impression that i=3;i++; would cause 3==4 to be true? If you are, you're nuts. If you aren't, but still think "integers are mutable" you have a tremendous conceptual lacuna around the difference between a variable and value, and reciting the names of programming languages isn't going to help. –  Malvolio Apr 29 '11 at 4:17

Above answerers said enough about copying. Though my suggestion would be, don't copy features just because 'Java has it'. Think about programmers who will write in that program. Would you use that new language for production work?


To comments about software patents: In the US and in countries where software patents are legal, you CAN patent an idea (for example, RIM was not allowed to use WiFi to transfer e-mails).

I agree that's an absurd, WiFi is only a internet connection type, and patenting Wireless E-Mail delivery is the same as patenting E-Mail delivery itself.

It's highly likely for the US Supreme Court not to allow litigating software patenting cases anymore, but time will show us.

share|improve this answer
    
A patent is very different from a copyright. You have to apply for it for one thing, you have to pay (a lot) for it, and it's a lot weaker. It has a short lifespan, and violating a patent is only a tort, it can never be a crime, so the FBI won't help with a "crackdown". –  Malvolio Apr 29 '11 at 16:55
    
Yep. But the only way to lock an idea to you (at least in countries with software patents) is to patent it, though I am strongly opposed to this practice and strongly discourage it. –  Luka Ramishvili May 1 '11 at 6:53

Copyrighting algorithms and code in general tends to be a very sore subject in the SE world. The idea is that if you come up with a way to solve problem X, you shouldn't be prevented from solving that problem just because someone previously used a similar approach.

If you did allow copyrighting of language features where would the line be drawn? (e.g. Can the first language that came up with the idea of arrays claim ownership over any future reimplementation?) It has the potential to be a very ugly mess if allowed.

I think at the basic level the question really doesn't fit the subject. Languages are not typically created with the intention to market and license the use of the language.

share|improve this answer
1  
Copyrighting algorithms is not a sore subject. It don't exist. You can't copyright an algorithm. You can try to patent it, it's legally permitted, but don't hold your breath. –  Malvolio Apr 29 '11 at 2:20
    
You only copyright source code -- an expression of an algorithm. –  S.Lott Apr 29 '11 at 2:24
    
As S.Lott said, the only thing that is copyrightable is the material expression of an idea. You can't copyright algorithms (or other ideas). And thank goodness for that. –  Rein Henrichs Apr 29 '11 at 2:36
    
It's possible to patent algorithms in the US (well, technically you don't patent the algorithm itself, but you can set it up so any use of the algorithm is an infringement). Most people in the software circles I frequent strongly dislike this. –  David Thornley Apr 29 '11 at 16:48

You should copy the ideas. However, you should only copy the ones that seem good and won't make your language inconsistent.

The side note: another programming language? Hm... Maybe I should invent one (or two) ;)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.