programming-languages

What languages support multiple inheritance?

What languages support multiple inheritance and what techniques do they use to mitigate the problems that arise from using multiple inheritance? ...

What's the advantage of using C over C++ or is there one?

Since C++ seems to have all of C's features, why learn C over C++? ...

Why was constness removed from Java and C#?

I know this has been discussed many times, but I am not sure I really understand why Java and C# designers chose to omit this feature from these languages. I am not interested in how I can make workarounds (using interfaces, cloning, or any other alternative), but rather in the rationale behind the decision. From a language design persp...

What language has the longest "Hello world" program?

In most scripting languages, a "Hello world!" application is very short: print "Hello world" In C++, it is a little more complicated, requiring at least 46 non-whitespace characters: #include <cstdio> int main() { puts("Hello world"); } Java, at 75 non-whitespace characters, is even more verbose: class A { public static void...

Do we need a Java++?

It seems to me that, in some ways, Java is where C was a while back. Both are fairly minimalist languages for their time, with relatively clean, simple cores to build on. (I'm referring to the core language here, not the libraries.) Both are/were extremely popular. Both are/were lingua francas, with tons of legacy code. Both are/wer...

how define friend function and operator overloading in c++

i want to know about the friend function and operator overloading in c++ and how they work? with program? ...

Using multiple languages in one project

From discussions I've had about language design, it seems like a lot of people make the argument that there is not and will never be "one true language". The alternative, according to these people, is to be familiar with several languages and to pick the right tool for the job. This makes perfect sense at the level of a whole project o...

Learning computers and programming

Hello, What would be a good methodology for learning how computers and computer programming works? For example, would you recommend learning how circuits work, then assembly language, and then higher level languages? ...

How to practice a language like C#?

These days I have learned some basic usage of C#. I think that because C# is often used in application programming ,we should practice the language in an engineering way rather than solving some algorithmic problems. But what is the best way to practice C# if I cannot find any projects related to the language in the work. ...

Best language to program some math? (free, fast, easy, cool, etc)

I'm trying to teach some guys who don't know much of programming and need to do lots of math. We need to optimize some functions using derivatives, max, min and some sums. But then again we are talking of functions, not numbers, so i was going to teach them matlab, but apparently they had a bad experience trying to learn matlab (and pr...

Are there examples for programming-languages support automatic management of resources besides memory?

The idea of automatic memory management has gained big support with new programming languages. I'm interested if concepts exists for automatic management of other resources like files, network-sockets etc.? ...

Is there any programming language where the variables types sizes in bits depends on the platform (32 vs 64 bit)?

I am C# developer and I am almost certain that in this language an "int" is always 32 bits regardless of the platform (32 vs 64 bit), a "long" is always 64 bits, a float is 32 and a double 64 and so on. There is any language where its not like that? Where the int size depends on the processor? ...

What programming language is most like natural language?

I got the idea for this question from numerous situations where I don't understand what the person is talking about and when others don't understand me. So, a "smart" solution would be to speak a computer language. :) I am interested how far a programming language can go to get near to (English) natural language. When I say near, I mea...

Uses for Dynamic Languages

My primary language right now is D, and I'm in the process of learning Python because it's required for a course I'm taking. While I understand why dynamic languages would be a breath of fresh air for people programming in static languages without type inference or templates (IMHO templates are to a large extent compile-time duck typing...

What are some pros/cons to various functional languages?

I know of several functional languages - F#, Lisp and its dialects, R, and more. However, as I've never used any of them (although the three I mentioned are on my "to-learn" list), I was wondering about the pros/cons of the various functional languages out there. Are there significant pros/cons, both in learning the language and in any r...

Which programming lanuages should I avoid learning because nobody will be using them in 5 years?

I want to learn some new programming languages but I want to avoid learning something that will be obsolete by the time I have a solid background in it. Which lanuages should I avoid because very few people will be using them in 5 years? ...

Which programming languages teach you the best new concepts?

I love learning new languages, but with limited time I want to optimize the bang I get for my buck. So; which languages do you recommend learning to get yourself exposed to a new way of thinking about programming? My own thoughts are C, because it gives you a good understanding of low-level stuff. Assembler, because it gives you good...

Javascript comma operator

When combining assignment with comma (something that you shouldn't do, probably), how does javascript determine which value is assigned? Consider these two snippets: function nl(x) { document.write(x + "<br>"); } var i = 0; nl(i+=1, i+=1, i+=1, i+=1); nl(i); And: function nl(x) { document.write(x + "<br>"); } var i = 0; nl((i+=1, i+=...

RESTful webservice to sum a list of numbers.

PHP makes this sort of thing dirt simple but I'd like to know how other languages do it. To standardize on a simple example, how would you implement the following webservice to sum a list of numbers: http://server.com/sum?summands=LIST where LIST is a list of space-separated real numbers. For example, http://server.com/sum?summands...

High-level programming language for music composition

I would like to write an interactive song. It would contain state and logic. A listener/user should be able to modify some state vars using a GUI or a MIDI interface. Listener accessible vars don't have to directly represent tempo, pitch or any other music property. They would rather represent values that logic would process in order to ...